105 lines
6.6 KiB
TypeScript
105 lines
6.6 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] */
|
|
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
|
|
var object2;
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
importAll(31) /* metro dependency 31 */;
|
|
let value = require(27) /* metro dependency 27 */;
|
|
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;
|
|
object2 = {};
|
|
object2.content = {alignItems: 'center'};
|
|
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object2.subtitle = {textAlign: 'center', marginTop: PX_16};
|
|
const object3 = {};
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object3.paddingHorizontal = PX_16;
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object3.paddingBottom = PX_16;
|
|
object2.sheetContent = object3;
|
|
const object6 = {};
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object6.gap = PX_16;
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object6.paddingBottom = PX_16;
|
|
object2.sheetBody = object6;
|
|
const env0_7 = Reflect.apply(createStyles, value, [object2]);
|
|
(require(2) /* metro dependency 2 */).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 closure = onPress_101085;
|
|
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
|
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).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 object = {};
|
|
object.keyName = credential.name;
|
|
const ActionSheetCloseButton = (require(6806) /* metro dependency 6806: ActionSheetCloseButtonNative */).ActionSheetCloseButton;
|
|
const items2 = [<BottomSheetTitleHeader title={Reflect.apply(formatToPlainString, intl, [mI3CoL,
|
|
object])} trailing={<ActionSheetCloseButton onPress={closure} />} />];
|
|
const image = <Image source={importDefault(13257) /* metro dependency 13257 */} />;
|
|
const Text = (require(4573) /* metro dependency 4573: Text */).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 = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
|
items2[2] = <View><Button text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['lqK//z'])} onPress={closure} 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__;
|
|
(importDefault(4080) /* metro dependency 4080: 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();
|
|
const webAuthnActionCreatorsModule = require(5084) /* metro dependency 5084: WebAuthnActionCreators */;
|
|
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 = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
|
|
const open = defaultImport.open;
|
|
const object2 = {key: 'WEBAUTHN_CREDENTIAL_DELETE_SUCCESS_TOAST_KEY'};
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const string = intl.string;
|
|
const ZnkeXs = (require(1244) /* metro dependency 1244: indexNative */).t.ZnkeXs;
|
|
object2.content = Reflect.apply(string, intl, [ZnkeXs]);
|
|
object2.icon = importDefault(11111) /* metro dependency 11111 */;
|
|
const CircleCheckIcon = (require(4073) /* metro dependency 4073: CircleCheckIcon */).CircleCheckIcon;
|
|
object2.IconComponent = CircleCheckIcon;
|
|
object2.iconColor = 'status-positive';
|
|
Reflect.apply(open, defaultImport, [object2]);
|
|
}
|
|
|