decord/source/design/components/Modal/native/StepModal.native.tsx

73 lines
2.5 KiB
TypeScript
Raw Normal View History

// Module ID: 14202
// Function ID: 14203
2026-07-20 16:05:17 +00:00
// Name: StepModal
// Dependencies: [32, 19, 17, 21, 4574, 5696, 1611, 11959, 14203, 2]
2026-07-20 16:05:17 +00:00
// Exports: StepModal
// Module 14202 (StepModal)
import useSafeAreaInsetsDefault from "useSafeAreaInsets" /* 1611 */;
import NavigatorConstants from "NavigatorConstants" /* 5696 */;
import Modal from "Modal" /* 11959 */;
import ModalStepIndicator from "ModalStepIndicator" /* 14203 */;
import _slicedToArray from "module_32" /* 32 */;
import noop from "module_19" /* 19 */;
2026-07-21 22:01:30 +00:00
require = fn;
const View = fn(17).View;
const jsxProd = fn(21);
({ jsx: metroRequire, jsxs: closure_7 } = jsxProd);
const createStyles = fn(4574);
let obj2 = { container: { height: "100%" }, stepContainer: null };
const rect = { flexDirection: "column", alignItems: "center", justifyContent: "center", top: 0, left: 0, right: 0, height: fn(5696).NAV_BAR_HEIGHT };
obj2.stepContainer = rect;
let closure_8 = createStyles.createStyles(obj2);
const size = fn(2);
const result = size.fileFinishedImporting("design/components/Modal/native/StepModal.native.tsx");
2026-07-20 16:05:17 +00:00
export const StepModal = function StepModal(steps) {
steps = steps.steps;
const onWillFocus = steps.onWillFocus;
const merged = Object.assign(steps, Object.assign({ steps: 0, onWillFocus: 0 }));
const tmp2 = closure_8();
const tmp3 = useSafeAreaInsetsDefault();
const tmp4 = _slicedToArray(noop.useState(0), 2);
closure_2 = tmp4[1];
2026-07-20 16:05:17 +00:00
const items = [onWillFocus, steps];
const obj = { style: tmp2.container, children: null };
const callback = noop.useCallback((onDidFocus) => {
2026-07-29 08:29:29 +00:00
let num;
if (steps != null) {
num = steps.indexOf(tmp.name);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (num == null) {
num = 0;
2026-07-20 16:05:17 +00:00
}
closure_2(num);
2026-07-29 08:29:29 +00:00
if (onWillFocus != null) {
onWillFocus(onDidFocus);
2026-07-20 16:05:17 +00:00
}
}, items);
const obj2 = {};
2026-07-20 16:05:17 +00:00
const merged1 = Object.assign(merged);
obj2.onWillFocus = callback;
obj2.headerStyle = { height: NavigatorConstants.NAV_BAR_HEIGHT + tmp3.top };
obj2.hideTitle = true;
const items1 = [timestampProducer(Modal.Modal, obj2), ];
const obj4 = { style: null, pointerEvents: "box-none", children: null };
const items2 = [tmp2.stepContainer, { marginTop: tmp3.top }];
obj4.style = items2;
const obj5 = { currentStep: tmp4[0], totalSteps: null };
2026-07-29 08:29:29 +00:00
let num;
if (steps != null) {
num = steps.length;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (num == null) {
num = 0;
2026-07-20 16:05:17 +00:00
}
obj5.totalSteps = num;
obj4.children = timestampProducer(ModalStepIndicator.ModalStepIndicator, obj5);
items1[1] = timestampProducer(View, obj4);
obj.children = items1;
return React5(View, obj);
2026-07-20 16:05:17 +00:00
};