106 lines
5.5 KiB
TypeScript
106 lines
5.5 KiB
TypeScript
/* Metro module 6515; source: design/components/Sheet/native/ActionSheetHeaderBar.native.tsx; dependencies: [31, 27, 33, 4501, 697, 1244, 1478, 3860, 4559, 2] */
|
|
function _fun51234(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#51234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6693:6, offset: 0x0122c6d0, size: 237 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
importAll(31) /* metro dependency 31 */;
|
|
let value = require(27) /* metro dependency 27 */;
|
|
const env0_3 = value.Pressable;
|
|
const env0_4 = value.StyleSheet;
|
|
const env0_5 = value.TouchableWithoutFeedback;
|
|
const env0_6 = value.View;
|
|
value = require(33) /* metro dependency 33 */;
|
|
const env0_7 = value.jsx;
|
|
const env0_8 = value.Fragment;
|
|
const env0_9 = value.jsxs;
|
|
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun51235);
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Sheet/native/ActionSheetHeaderBar.native.tsx');
|
|
exports.ActionSheetHeaderBar = ActionSheetHeaderBar;
|
|
}
|
|
|
|
function _fun51235(a0, a1, a2) { // fn#51235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6693:245, offset: 0x0122c7bd, size: 444 bytes, params: 4, frame: 21
|
|
var r11;
|
|
var r5;
|
|
var object3;
|
|
var WHITE;
|
|
var object9;
|
|
var object10;
|
|
const object11 = {};
|
|
const object12 = {marginBottom: a2};
|
|
copyDataProperties(object12, a0 === 'floating' ? {'left': 0, 'right': 0,
|
|
'position': 'absolute'} : a0 !== 'overlay' ? undefined : {'left': 0, 'right': 0, 'position': 'absolute'}, r11);
|
|
object11.header = object12;
|
|
const object13 = {alignSelf: 'center'};
|
|
const value2 = undefined;
|
|
const SHEET_HANDLE_WIDTH = (importDefault(697) /* metro dependency 697: native */).modules.mobile.SHEET_HANDLE_WIDTH;
|
|
object13.width = SHEET_HANDLE_WIDTH;
|
|
const SHEET_HANDLE_HEIGHT = (importDefault(697) /* metro dependency 697: native */).modules.mobile.SHEET_HANDLE_HEIGHT;
|
|
object13.height = SHEET_HANDLE_HEIGHT;
|
|
const sm = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
|
object13.borderRadius = sm;
|
|
const SHEET_HANDLE_MARGIN_TOP = (importDefault(697) /* metro dependency 697: native */).modules.mobile.SHEET_HANDLE_MARGIN_TOP;
|
|
object13.top = SHEET_HANDLE_MARGIN_TOP;
|
|
if (a0 === 'default') {
|
|
object10 = {};
|
|
object10.backgroundColor = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
|
|
r5 = object10;
|
|
r11 = sm;
|
|
} else if (a0 === 'floating') {
|
|
object9 = {};
|
|
object9.backgroundColor = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
|
|
r5 = object9;
|
|
r11 = sm;
|
|
} else if (a0 !== 'overlay') {
|
|
r5 = value2;
|
|
r11 = sm;
|
|
} else {
|
|
object3 = {};
|
|
WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
|
|
object3.backgroundColor = WHITE;
|
|
copyDataProperties(object3, (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_LOW, WHITE);
|
|
r5 = object3;
|
|
r11 = WHITE;
|
|
}
|
|
copyDataProperties(object13, r5, r11);
|
|
object11.indicator = object13;
|
|
const object14 = {};
|
|
copyDataProperties(object14, StyleSheet.absoluteFillObject, r11);
|
|
object14['height'] = a1;
|
|
object14['marginTop'] = -a1 + a2;
|
|
object11.accessibleDismiss = object14;
|
|
return object11;
|
|
}
|
|
|
|
function ActionSheetHeaderBar({accessibilityLabel, style, tabStyle, onPress, variant}) { // fn#51236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6693:1050, offset: 0x0122c979, size: 412 bytes, params: 2, frame: 26
|
|
var r10;
|
|
var r0;
|
|
var value;
|
|
var intl;
|
|
var jsxRuntimeEnv0_8Binding;
|
|
if (accessibilityLabel !== undefined) {
|
|
r10 = accessibilityLabel;
|
|
} else {
|
|
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
r10 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.WAI6xu);
|
|
}
|
|
variant = variant === undefined ? 'default' : variant;
|
|
const height = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().height;
|
|
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
|
const useToken = useTokenModule.useToken;
|
|
const SHEET_HANDLE_MARGIN_BOTTOM = (importDefault(697) /* metro dependency 697: native */).modules.mobile.SHEET_HANDLE_MARGIN_BOTTOM;
|
|
const styles = useStyles(variant, height, Reflect.apply(useToken, useTokenModule, [SHEET_HANDLE_MARGIN_BOTTOM]));
|
|
const value3 = (require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */).useIsScreenReaderEnabled();
|
|
const touchableWithoutFeedback = <TouchableWithoutFeedback onPress={onPress} onAccessibilityEscape={onPress} {...{['aria-hidden']: true}}><View style={[styles.header,
|
|
style]}><View style={[styles.indicator, tabStyle]} /></View></TouchableWithoutFeedback>;
|
|
if (value3) {
|
|
jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
|
|
value = <Pressable style={styles.accessibleDismiss} accessible accessibilityLabel={r10} accessibilityRole="button" onPress={onPress} />;
|
|
value = <>{value}{touchableWithoutFeedback}</>;
|
|
r0 = value;
|
|
} else {
|
|
r0 = touchableWithoutFeedback;
|
|
}
|
|
return r0;
|
|
}
|
|
|