70 lines
3.7 KiB
TypeScript
70 lines
3.7 KiB
TypeScript
/* Metro module 12805; source: design/components/Modal/native/StepModal.native.tsx; dependencies: [57, 31, 27, 33, 4501, 5314, 1585, 10121, 12806, 2] */
|
|
function _fun97670(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12995:6, offset: 0x0218c978, size: 273 bytes, params: 8, frame: 20
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
|
const env0_4 = importAll(31) /* metro dependency 31 */;
|
|
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
|
let value = require(33) /* metro dependency 33 */;
|
|
const env0_6 = value.jsx;
|
|
const env0_7 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
|
|
const env0_8 = Reflect.apply(createStyles, value, [{container: {height: '100%'},
|
|
stepContainer: {'flexDirection': 'column', 'alignItems': 'center', 'justifyContent': 'center', 'top': 0,
|
|
'left': 0, 'right': 0, height: NAV_BAR_HEIGHT}}]);
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/components/Modal/native/StepModal.native.tsx');
|
|
exports.StepModal = StepModal;
|
|
}
|
|
|
|
function StepModal(a0) { // fn#97671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12995:441, offset: 0x0218ca89, size: 430 bytes, params: 2, frame: 28
|
|
const steps = a0.steps;
|
|
const onWillFocus = a0.onWillFocus;
|
|
let value = Object.create(null);
|
|
const value2 = 0;
|
|
value.steps = value2;
|
|
value.onWillFocus = value2;
|
|
const value3 = copyDataProperties({}, a0, value, undefined);
|
|
const value5 = undefined;
|
|
const styles = useStyles();
|
|
const value6 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
|
|
const binding = env0_4;
|
|
const value8 = env0_3(binding.useState(value2), 2);
|
|
const property = value8[value2];
|
|
const env0_2 = value8[1];
|
|
const value9 = binding.useCallback(_fun97672, [onWillFocus, steps]);
|
|
const Modal = (require(10121) /* metro dependency 10121: ModalNative */).Modal;
|
|
const modalProps = {...value3};
|
|
modalProps['onWillFocus'] = value9;
|
|
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
|
|
modalProps['headerStyle'] = {height: NAV_BAR_HEIGHT + value6.top};
|
|
modalProps['hideTitle'] = true;
|
|
value = <Modal {...modalProps} />;
|
|
const items2 = [styles.stepContainer];
|
|
items2[1] = {marginTop: value6.top};
|
|
const ModalStepIndicator = (require(12806) /* metro dependency 12806: ModalStepIndicatorNative */).ModalStepIndicator;
|
|
return (
|
|
<View style={styles.container}>
|
|
{value}
|
|
<View style={items2} pointerEvents="box-none">
|
|
<ModalStepIndicator currentStep={property} totalSteps={(steps == null ? value5 : steps.length) ?? value2} />
|
|
</View>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function _fun97672(a0) { // fn#97672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12995:570, offset: 0x0218cc37, size: 89 bytes, params: 2, frame: 17
|
|
const route = a0.route;
|
|
const binding = env0_2;
|
|
const stepsBinding = steps;
|
|
const value2 = undefined;
|
|
binding((stepsBinding == null ? value2 : steps.indexOf(route.name)) ?? 0);
|
|
if (onWillFocus != null) {
|
|
onWillFocus(a0);
|
|
}
|
|
return value2;
|
|
}
|
|
|