57 lines
2.2 KiB
TypeScript
57 lines
2.2 KiB
TypeScript
// Module ID: 9115
|
|
// Function ID: 9116
|
|
// Name: ItemSelectorActionSheet
|
|
// Dependencies: [19, 21, 4101, 712, 1629, 5503, 5502, 5871, 5505, 8136, 8135, 2]
|
|
// Exports: default
|
|
|
|
// Module 9115 (ItemSelectorActionSheet)
|
|
import noopAll from "noop" /* 19 */;
|
|
import ThemesDefault from "Themes" /* 712 */;
|
|
import useSafeAreaInsetsDefault from "useSafeAreaInsets" /* 1629 */;
|
|
import jsxProd from "jsxProd" /* 21 */;
|
|
|
|
const require = arg1;
|
|
noopAll;
|
|
({ jsx: c3, jsxs: c4 } = jsxProd);
|
|
const result = require("set").fileFinishedImporting("components_native/common/ItemSelectorActionSheet.tsx");
|
|
|
|
export default function ItemSelectorActionSheet(arg0) {
|
|
({ title, items } = arg0);
|
|
({ selectedItem: importDefault, onItemSelect: dependencyMap, onClose } = arg0);
|
|
({ body, hasIcons } = arg0);
|
|
let obj = items(4101);
|
|
const token = obj.useToken(ThemesDefault.modules.mobile.TABLE_ROW_PADDING);
|
|
const findIndexResult = items.findIndex((value) => value.value === closure_1);
|
|
obj = { title, trailing: null };
|
|
let tmp6Result = null;
|
|
if (null != onClose) {
|
|
obj = { onPress: null };
|
|
obj[0] = onClose;
|
|
tmp6Result = tmp6(tmp(5871).ActionSheetCloseButton, obj);
|
|
}
|
|
obj1 = { scrollable: true, header: closure_3(items(5502).BottomSheetTitleHeader, obj), children: null };
|
|
obj[1] = tmp6Result;
|
|
const obj2 = { contentContainerStyle: { paddingHorizontal: token, paddingBottom: useSafeAreaInsetsDefault().bottom + ThemesDefault.space.PX_16 }, children: null };
|
|
items = [body, ];
|
|
let num = -1;
|
|
if (findIndexResult >= 0) {
|
|
num = findIndexResult;
|
|
}
|
|
const obj3 = { paddingHorizontal: token, paddingBottom: useSafeAreaInsetsDefault().bottom + ThemesDefault.space.PX_16 };
|
|
const tmp3 = importDefault;
|
|
const tmp8 = closure_4;
|
|
items[1] = closure_3(items(8136).TableRadioGroup, {
|
|
value: num,
|
|
accessibilityLabel: title,
|
|
hasIcons,
|
|
onChange(arg0) {
|
|
if (null != items[arg0]) {
|
|
dependencyMap(iter.value);
|
|
}
|
|
},
|
|
children: items.map((label, value) => callback(items(8135).TableRadioRow, { label: label.label, value }, value))
|
|
});
|
|
obj2[1] = items;
|
|
obj1[2] = tmp8(items(5505).BottomSheetScrollView, obj2);
|
|
return closure_3(items(5503).BottomSheet, obj1);
|
|
};
|