decord/source/design/components/Sheet/native/ActionSheetPresenter.native.tsx

88 lines
3.7 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 13556
// Function ID: 13557
2026-07-20 16:05:17 +00:00
// Name: ActionSheetPresenter
2026-08-24 06:08:38 +00:00
// Dependencies: [32, 19, 17, 4089, 676, 21, 9214, 503, 4346, 4737, 7160, 4722, 589, 11644, 4675, 2]
2026-07-20 16:05:17 +00:00
// Exports: ActionSheetPresenter
2026-08-24 06:08:38 +00:00
// Module 13556 (ActionSheetPresenter)
import closure_3 from "_slicedToArray" /* 32 */;
import importAllResult from "noop" /* 19 */;
import { StyleSheet } from "get ActivityIndicator" /* 17 */;
import closure_6 from "setContent" /* 4089 */;
import { NOOP } from "ME" /* 676 */;
import { jsx } from "jsxProd" /* 21 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
let c4 = importAllResult;
let closure_9 = importAllResult.forwardRef((sheetKey, ref) => {
2026-07-20 16:05:17 +00:00
sheetKey = sheetKey.sheetKey;
2026-07-29 08:29:29 +00:00
let first;
2026-08-24 06:08:38 +00:00
dependencyMap = undefined;
2026-07-29 08:29:29 +00:00
let callback;
callback = undefined;
2026-08-24 06:08:38 +00:00
closure_5 = undefined;
2026-07-29 08:29:29 +00:00
let callback1;
let callback2;
2026-07-20 16:05:17 +00:00
({ content, impressionName, impressionProperties, zIndex } = sheetKey);
2026-07-23 10:11:24 +00:00
const tmp = callback(callback.useState("visible"), 2);
2026-07-29 08:29:29 +00:00
first = tmp[0];
dependencyMap = tmp[1];
2026-07-23 10:11:24 +00:00
callback = callback.useRef(callback2);
callback = callback.useCallback((current) => {
2026-08-24 06:08:38 +00:00
closure_3.current = current;
2026-07-20 16:05:17 +00:00
}, []);
2026-07-29 08:29:29 +00:00
closure_5 = callback.useRef(callback2);
callback1 = callback.useCallback(() => {
2026-07-20 16:05:17 +00:00
ref2.current();
}, []);
2026-08-24 06:08:38 +00:00
let obj = { type: sheetKey(503).ImpressionTypes.HALFSHEET, name: impressionName, properties: impressionProperties };
first(9214)(obj);
2026-07-29 08:29:29 +00:00
const imperativeHandle = callback.useImperativeHandle(ref, () => ({
2026-07-20 16:05:17 +00:00
componentDidEnter() {
2026-07-29 08:29:29 +00:00
callback("visible");
2026-07-20 16:05:17 +00:00
},
componentWillLeave(current) {
2026-07-29 08:29:29 +00:00
callback("exiting");
closure_5.current = current;
2026-07-20 16:05:17 +00:00
},
componentDidLeave() {
2026-07-29 08:29:29 +00:00
callback("exited");
2026-08-24 06:08:38 +00:00
closure_5.current = closure_1_7;
2026-07-20 16:05:17 +00:00
}
}), []);
const items = [sheetKey];
2026-07-23 10:11:24 +00:00
callback2 = callback.useCallback(() => {
first(table[8]).hideActionSheet(sheetKey);
2026-07-20 16:05:17 +00:00
}, items);
const items1 = [first, callback2, callback1, callback];
const items2 = [callback2];
2026-07-23 10:11:24 +00:00
const memo = callback.useMemo(() => ({ transitionState: first, close: callback2, onLeave: callback1, registerDismissHandler: callback }), items1);
const callback3 = callback.useCallback(() => {
2026-07-29 08:29:29 +00:00
const current = ref.current;
if (current != null) {
current();
2026-07-20 16:05:17 +00:00
}
callback2();
return true;
}, items2);
2026-08-24 06:08:38 +00:00
first(4737)(callback3);
obj = { value: memo, children: jsx(sheetKey(4722).Dialog, { dialogKey: sheetKey, onDismiss: callback2, zIndex, children: content }) };
return jsx(first(7160).Provider, { value: memo, children: jsx(sheetKey(4722).Dialog, { dialogKey: sheetKey, onDismiss: callback2, zIndex, children: content }) });
2026-07-20 16:05:17 +00:00
});
2026-08-24 06:08:38 +00:00
let result = require("set").fileFinishedImporting("design/components/Sheet/native/ActionSheetPresenter.native.tsx");
2026-07-20 16:05:17 +00:00
export const ActionSheetPresenter = function ActionSheetPresenter(appEntryKey) {
appEntryKey = appEntryKey.appEntryKey;
const items = [appEntryKey];
const effect = importAllResult.useEffect(() => () => {
2026-08-24 06:08:38 +00:00
const result = closure_1_1(closure_1_2[8]).resetActionSheetsForAppEntryKey(closure_0);
2026-07-20 16:05:17 +00:00
}, items);
2026-07-29 08:29:29 +00:00
let obj = appEntryKey(589);
2026-08-24 06:08:38 +00:00
const items1 = [closure_6];
2026-07-29 08:29:29 +00:00
const stateFromStoresArray = obj.useStateFromStoresArray(items1, () => stack.getStack(), []);
const found = stateFromStoresArray.filter((appEntryKey) => appEntryKey.appEntryKey === appEntryKey);
const mapped = found.map((content) => callback(closure_9, { sheetKey: content.key, content: content.content, impressionName: content.impressionName, impressionProperties: content.impressionProperties, zIndex: content.zIndex }, content.key));
2026-08-24 06:08:38 +00:00
obj = { style: StyleSheet.absoluteFill, component: appEntryKey(4675).TransitionGroupOverlayView, children: mapped };
return jsx(appEntryKey(11644).TransitionGroup, { style: StyleSheet.absoluteFill, component: appEntryKey(4675).TransitionGroupOverlayView, children: mapped });
2026-07-20 16:05:17 +00:00
};