82 lines
4.9 KiB
TypeScript
82 lines
4.9 KiB
TypeScript
/* Metro module 9059; source: components_native/common/ItemSelectorActionSheet.tsx; dependencies: [31, 33, 3860, 697, 1585, 6275, 6758, 6806, 6277, 7988, 7987, 2] */
|
|
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
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 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 UseTokenModule from '../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
|
|
import * as BottomSheetNativeModule from '../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
|
|
import * as Module06277Module from '../../by-id/module-06277.js'; /* Metro dependency 6277 */
|
|
import * as BottomSheetTitleHeaderNativeModule from '../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
|
|
import * as TableRadioRowNativeModule from '../../design/components/TableRow/native/TableRadioRow.native.tsx'; /* Metro dependency 7987 */
|
|
import * as TableRadioGroupNativeModule from '../../design/components/TableRow/native/TableRadioGroup.native.tsx'; /* Metro dependency 7988 */
|
|
|
|
function _fun70826(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9244:6, offset: 0x01d09dfd, size: 147 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
ReactModule;
|
|
(FileImportTrackerModule).fileFinishedImporting('components_native/common/ItemSelectorActionSheet.tsx');
|
|
exports.default = ItemSelectorActionSheet;
|
|
function ItemSelectorActionSheet({title, body, items, selectedItem, onItemSelect, onClose, hasIcons}) { // fn#70827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9244:229, offset: 0x01d09e90, size: 490 bytes, params: 2, frame: 31
|
|
const useToken = UseTokenModule.useToken;
|
|
const TABLE_ROW_PADDING = (Native).modules.mobile.TABLE_ROW_PADDING;
|
|
const value2 = Reflect.apply(useToken, UseTokenModule, [TABLE_ROW_PADDING]);
|
|
const bottom = (UseSafeAreaInsetsNative)().bottom;
|
|
const index = items.findIndex(function({value}) {
|
|
return value === selectedItem;
|
|
});
|
|
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
|
|
const object = {scrollable: true};
|
|
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
|
|
object.header = (
|
|
<BottomSheetTitleHeader
|
|
title={title}
|
|
trailing={onClose != null
|
|
? ((ActionSheetCloseButton) => <ActionSheetCloseButton onPress={onClose} />)((require(6806) /* metro dependency 6806: ActionSheetCloseButtonNative */).ActionSheetCloseButton)
|
|
: null}
|
|
/>
|
|
);
|
|
const BottomSheetScrollView = (Module06277Module).BottomSheetScrollView;
|
|
const object4 = {paddingHorizontal: value2};
|
|
const PX_16 = (Native).space.PX_16;
|
|
object4.paddingBottom = bottom + PX_16;
|
|
const TableRadioGroup = (TableRadioGroupNativeModule).TableRadioGroup;
|
|
return (
|
|
<BottomSheet {...object}>
|
|
<BottomSheetScrollView contentContainerStyle={object4}>
|
|
{body}
|
|
<TableRadioGroup
|
|
value={index >= 0 ? index : -1}
|
|
accessibilityLabel={title}
|
|
hasIcons={hasIcons}
|
|
onChange={function(a0) {
|
|
var property = items[a0];
|
|
if (property != null) {
|
|
onItemSelect(property.value);
|
|
}
|
|
}}
|
|
>
|
|
{items.map(_fun70830)}
|
|
</TableRadioGroup>
|
|
</BottomSheetScrollView>
|
|
</BottomSheet>
|
|
);
|
|
function _fun70830(a0, a1) { // fn#70830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9244:899, offset: 0x01d0a0b7, size: 65 bytes, params: 3, frame: 16
|
|
const TableRadioRow = (TableRadioRowNativeModule).TableRadioRow;
|
|
return (
|
|
<TableRadioRow
|
|
label={a0.label}
|
|
value={a1}
|
|
key={a1}
|
|
/>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun70826, 9059, [31, 33, 3860, 697, 1585, 6275, 6758, 6806, 6277, 7988, 7987,
|
|
2]) /* metro module 9059, dependencies: [31, 33, 3860, 697, 1585, 6275, 6758, 6806, 6277, 7988, 7987, 2] */;
|