151 lines
8.9 KiB
TypeScript
151 lines
8.9 KiB
TypeScript
/* Metro module 13256; source: modules/webauthn/native/WebAuthnDeleteActionSheet.tsx; dependencies: [31, 27, 33, 4501, 697, 4080, 6275, 6758, 1244, 6806, 13257, 4573, 4578, 5084, 3857, 11111, 4073, 9149, 8129, 2] */
|
|
import ToastActionCreators from '../../toast/native/ToastActionCreators.tsx'; /* Metro dependency 3857 */
|
|
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
|
|
import Module13257 from '../../../by-id/module-13257.js'; /* Metro dependency 13257 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as CircleCheckIconModule from '../../../design/components/Icon/native/redesign/generated/CircleCheckIcon.tsx'; /* Metro dependency 4073 */
|
|
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
|
|
import * as WebAuthnActionCreatorsModule from '../WebAuthnActionCreators.tsx'; /* Metro dependency 5084 */
|
|
import * as BottomSheetNativeModule from '../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
|
|
import * as BottomSheetTitleHeaderNativeModule from '../../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
|
|
import * as ActionSheetCloseButtonNativeModule from '../../../design/components/Sheet/native/ActionSheetCloseButton.native.tsx'; /* Metro dependency 6806 */
|
|
|
|
function _fun101083(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13446:6, offset: 0x022078b1, size: 365 bytes, params: 8, frame: 22
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
ReactModule;
|
|
let value = ReactNativeModule;
|
|
const env0_3 = value.Image;
|
|
const env0_4 = value.View;
|
|
value = require(33) /* metro dependency 33 */;
|
|
const env0_5 = value.jsx;
|
|
const env0_6 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {};
|
|
object.content = {alignItems: 'center'};
|
|
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object.subtitle = {textAlign: 'center', marginTop: PX_16};
|
|
const object4 = {};
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object4.paddingHorizontal = PX_16;
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object4.paddingBottom = PX_16;
|
|
object.sheetContent = object4;
|
|
const object5 = {};
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object5.gap = PX_16;
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object5.paddingBottom = PX_16;
|
|
object.sheetBody = object5;
|
|
const env0_7 = Reflect.apply(createStyles, value, [object]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/webauthn/native/WebAuthnDeleteActionSheet.tsx');
|
|
exports.default = WebAuthnDeleteActionSheet;
|
|
function WebAuthnDeleteActionSheet({credential, deleting, setDeleting}) { // fn#101084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13446:531, offset: 0x02207a1e, size: 663 bytes, params: 2, frame: 29
|
|
const styles = useStyles();
|
|
const onPress_1010852 = onPress_101085;
|
|
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
|
|
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const formatToPlainString = intl.formatToPlainString;
|
|
const mI3CoL = (require(1244) /* metro dependency 1244: indexNative */).t.mI3CoL;
|
|
const object2 = {};
|
|
object2.keyName = credential.name;
|
|
const ActionSheetCloseButton = (ActionSheetCloseButtonNativeModule).ActionSheetCloseButton;
|
|
const items2 = [
|
|
<BottomSheetTitleHeader
|
|
title={Reflect.apply(formatToPlainString, intl, [mI3CoL, object2])}
|
|
trailing={<ActionSheetCloseButton onPress={onPress_1010852} />}
|
|
/>,
|
|
];
|
|
const image = <Image source={Module13257} />;
|
|
const Text = (TextModule).Text;
|
|
const string = intl.string;
|
|
const IfTbc1 = (require(1244) /* metro dependency 1244: indexNative */).t.IfTbc1;
|
|
items2[1] = (
|
|
<View style={styles.content}>
|
|
{image}
|
|
<Text variant="heading-md/normal" style={styles.subtitle}>
|
|
{Reflect.apply(string, intl, [IfTbc1])}
|
|
</Text>
|
|
</View>
|
|
);
|
|
const Button = (ButtonNativeModule).Button;
|
|
items2[2] = (
|
|
<View>
|
|
<Button
|
|
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['lqK//z'])}
|
|
onPress={onPress_1010852}
|
|
variant="primary"
|
|
grow
|
|
/>
|
|
</View>
|
|
);
|
|
items2[3] = (
|
|
<View>
|
|
<Button
|
|
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zYOk0f)}
|
|
onPress={onPress_101086}
|
|
variant="destructive"
|
|
disabled={deleting}
|
|
loading={deleting}
|
|
grow
|
|
/>
|
|
</View>
|
|
);
|
|
return (
|
|
<BottomSheet contentStyles={styles.sheetContent} bodyStyles={styles.sheetBody}>
|
|
{items2}
|
|
</BottomSheet>
|
|
);
|
|
function WebAuthnDeleteActionSheetOnPress() { // fn#101085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13446:629, owner: WebAuthnDeleteActionSheet.onPress, offset: 0x02207cb5, size: 37 bytes, params: 1, frame: 11
|
|
const value = environment.__proto__;
|
|
(ActionSheetActionCreators).hideActionSheet();
|
|
}
|
|
|
|
function WebAuthnDeleteActionSheetOnPress_101086() { // fn#101086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13446:1309, owner: WebAuthnDeleteActionSheet.onPress, offset: 0x02207cda, size: 119 bytes, params: 1, frame: 14
|
|
setDeleting(true);
|
|
onPress_101085();
|
|
let value = WebAuthnActionCreatorsModule.deleteWebAuthnCredential(credential);
|
|
value = value.then(_fun101087);
|
|
value = value.catch(function(a0) {
|
|
var defaultImport = importDefault(dependencyMap[14]);
|
|
var object = {key: 'WEBAUTHN_CREDENTIAL_DELETE_ERROR_TOAST_KEY', content: a0.message,
|
|
icon: importDefault(dependencyMap[17])};
|
|
object.IconComponent = require(dependencyMap[18]).WarningIcon;
|
|
object.iconColor = 'icon-feedback-critical';
|
|
defaultImport.open(object);
|
|
});
|
|
value.finally(function() {
|
|
setDeleting(false);
|
|
});
|
|
function _fun101087() { // fn#101087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13446:1377, offset: 0x02207d51, size: 156 bytes, params: 1, frame: 18
|
|
const defaultImport = ToastActionCreators;
|
|
const open = defaultImport.open;
|
|
const object = {key: 'WEBAUTHN_CREDENTIAL_DELETE_SUCCESS_TOAST_KEY'};
|
|
const intl = (IndexNativeModule).intl;
|
|
const string = intl.string;
|
|
const ZnkeXs = (IndexNativeModule).t.ZnkeXs;
|
|
object.content = Reflect.apply(string, intl, [ZnkeXs]);
|
|
object.icon = importDefault(11111) /* metro dependency 11111 */;
|
|
const CircleCheckIcon = (CircleCheckIconModule).CircleCheckIcon;
|
|
object.IconComponent = CircleCheckIcon;
|
|
object.iconColor = 'status-positive';
|
|
Reflect.apply(open, defaultImport, [object]);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun101083, 13256, [31, 27, 33, 4501, 697, 4080, 6275, 6758, 1244, 6806, 13257, 4573, 4578, 5084, 3857,
|
|
11111, 4073, 9149, 8129,
|
|
2]) /* metro module 13256, dependencies: [31, 27, 33, 4501, 697, 4080, 6275, 6758, 1244, 6806, 13257, 4573, 4578, 5084, 3857, 11111, 4073, 9149, 8129, 2] */;
|