70 lines
4.2 KiB
TypeScript
70 lines
4.2 KiB
TypeScript
/* Metro module 6804; source: design/components/Sheet/native/SimpleActionSheet.native.tsx; dependencies: [31, 33, 6805, 6758, 6806, 6807, 2] */
|
|
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 ActionSheetNativeModule from './ActionSheet.native.tsx'; /* Metro dependency 6805 */
|
|
import * as ActionSheetRowNativeModule from './ActionSheetRow.native.tsx'; /* Metro dependency 6807 */
|
|
|
|
function _fun53546(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6982:6, offset: 0x0134e705, size: 144 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const SimpleActionSheet2 = SimpleActionSheet;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
ReactModule;
|
|
(FileImportTrackerModule).fileFinishedImporting('design/components/Sheet/native/SimpleActionSheet.native.tsx');
|
|
exports.default = SimpleActionSheet2;
|
|
exports.SimpleActionSheet = SimpleActionSheet2;
|
|
function SimpleActionSheet({hideActionSheet, header, options, hasIcons}) { // fn#53547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6982:131, offset: 0x0134e795, size: 308 bytes, params: 2, frame: 27
|
|
const ActionSheet = (ActionSheetNativeModule).ActionSheet;
|
|
const r6 = header != null && ((BottomSheetTitleHeader) => <BottomSheetTitleHeader leading={header.icon} title={header.title} subtitle={header.subtitle} trailing={header.onClose != null ? ((ActionSheetCloseButton) => <ActionSheetCloseButton onPress={header.onClose} />)((require(6806) /* metro dependency 6806: ActionSheetCloseButtonNative */).ActionSheetCloseButton) : null} />)((require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader);
|
|
const ActionSheetRow = (ActionSheetRowNativeModule).ActionSheetRow;
|
|
const Group = ActionSheetRow.Group;
|
|
return (
|
|
<ActionSheet>
|
|
{r6}
|
|
<Group hasIcons={hasIcons}>
|
|
{options.map(_fun53548)}
|
|
</Group>
|
|
</ActionSheet>
|
|
);
|
|
function _fun53548({label, icon, IconComponent, isDestructive, onPress}, a1) { // fn#53548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6982:486, offset: 0x0134e8c9, size: 187 bytes, params: 3, frame: 20
|
|
var environment;
|
|
var r6;
|
|
var value;
|
|
if (icon != null) {
|
|
value = environment.__proto__;
|
|
value = ((Icon) => <Icon source={icon} IconComponent={IconComponent} />)((require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon);
|
|
r6 = value;
|
|
} else {
|
|
value = undefined;
|
|
if (IconComponent != null) {
|
|
value = environment.__proto__;
|
|
value = ((Icon) => <Icon source={icon} IconComponent={IconComponent} />)((require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon);
|
|
r6 = value;
|
|
} else {
|
|
r6 = value;
|
|
}
|
|
}
|
|
value = environment.__proto__;
|
|
const ActionSheetRow = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
|
|
return (
|
|
<ActionSheetRow
|
|
icon={r6}
|
|
variant={isDestructive ? 'danger' : 'default'}
|
|
label={label}
|
|
onPress={function() {
|
|
hideActionSheet();
|
|
onPress();
|
|
}}
|
|
key={a1}
|
|
/>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun53546, 6804, [31, 33, 6805, 6758, 6806, 6807,
|
|
2]) /* metro module 6804, dependencies: [31, 33, 6805, 6758, 6806, 6807, 2] */;
|