Files
2026-07-28 01:06:53 +03:00

78 lines
4.6 KiB
TypeScript

/* Metro module 12805; source: design/components/Modal/native/StepModal.native.tsx; dependencies: [57, 31, 27, 33, 4501, 5314, 1585, 10121, 12806, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UseSafeAreaInsetsNative from '../../../../modules/safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NavigatorConstantsNativeModule from '../../Navigator/native/NavigatorConstants.native.tsx'; /* Metro dependency 5314 */
import * as ModalNativeModule from './Modal.native.tsx'; /* Metro dependency 10121 */
import * as ModalStepIndicatorNativeModule from './ModalStepIndicator.native.tsx'; /* Metro dependency 12806 */
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});
let value = JsxRuntimeModule;
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 = (NavigatorConstantsNativeModule).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}}]);
(FileImportTrackerModule).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 = (UseSafeAreaInsetsNative)();
const value8 = Module00057(ReactModule.useState(value2), 2);
const property = value8[value2];
const env0_2 = value8[1];
const value9 = ReactModule.useCallback(_fun97672, [onWillFocus, steps]);
const Modal = (ModalNativeModule).Modal;
const modalProps = {...value3};
modalProps['onWillFocus'] = value9;
const NAV_BAR_HEIGHT = (NavigatorConstantsNativeModule).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 = (ModalStepIndicatorNativeModule).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;
}
}
}
global.__d(_fun97670, 12805, [57, 31, 27, 33, 4501, 5314, 1585, 10121, 12806,
2]) /* metro module 12805, dependencies: [57, 31, 27, 33, 4501, 5314, 1585, 10121, 12806, 2] */;