decord/source/modules/webauthn/native/WebAuthnDeleteActionSheet.tsx

100 lines
4.7 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 14158
// Function ID: 14159
2026-07-20 16:05:17 +00:00
// Name: WebAuthnDeleteActionSheet
2026-08-24 06:08:38 +00:00
// Dependencies: [19, 17, 21, 4668, 712, 4346, 6988, 6987, 1236, 7214, 14159, 4739, 4750, 5269, 4097, 10325, 4339, 8953, 8117, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-24 06:08:38 +00:00
// Module 14158 (WebAuthnDeleteActionSheet)
import noopAll from "noop" /* 19 */;
import ThemesDefault from "Themes" /* 712 */;
import registerAssetDefault from "registerAsset" /* 14159 */;
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
import jsxProd from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4668 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-08-24 06:08:38 +00:00
noopAll;
2026-07-29 08:29:29 +00:00
({ Image: c3, View: c4 } = get_ActivityIndicator);
({ jsx: c5, jsxs: closure_6 } = jsxProd);
createCacheKey = { content: { alignItems: "center" }, subtitle: null, sheetContent: null, sheetBody: null };
2026-08-24 06:08:38 +00:00
createCacheKey = { textAlign: "center", marginTop: ThemesDefault.space.PX_16 };
2026-07-29 08:29:29 +00:00
createCacheKey[1] = createCacheKey;
2026-08-24 06:08:38 +00:00
createCacheKey[2] = { paddingHorizontal: ThemesDefault.space.PX_16, paddingBottom: ThemesDefault.space.PX_16 };
let obj1 = { paddingHorizontal: ThemesDefault.space.PX_16, paddingBottom: ThemesDefault.space.PX_16 };
createCacheKey[3] = { gap: ThemesDefault.space.PX_16, paddingBottom: ThemesDefault.space.PX_16 };
let closure_7 = createCacheKey.createStyles(createCacheKey);
let obj2 = { gap: ThemesDefault.space.PX_16, paddingBottom: ThemesDefault.space.PX_16 };
let result = require("set").fileFinishedImporting("modules/webauthn/native/WebAuthnDeleteActionSheet.tsx");
2026-07-20 16:05:17 +00:00
export default function WebAuthnDeleteActionSheet(credential) {
credential = credential.credential;
2026-07-23 10:11:24 +00:00
({ deleting, setDeleting: importDefault } = credential);
2026-07-20 16:05:17 +00:00
function handleClose() {
2026-07-29 08:29:29 +00:00
callback(table[5]).hideActionSheet();
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
const tmp = callback3();
2026-07-29 08:29:29 +00:00
let obj = { contentStyles: tmp.sheetContent, bodyStyles: tmp.sheetBody, children: null };
obj = { title: null, trailing: null };
let intl = credential(1236).intl;
2026-07-20 16:05:17 +00:00
obj = { keyName: credential.name };
2026-07-29 08:29:29 +00:00
obj[0] = intl.formatToPlainString(credential(1236).t.mI3CoL, obj);
2026-08-24 06:08:38 +00:00
obj[1] = callback(credential(7214).ActionSheetCloseButton, { onPress: handleClose });
const items = [callback(credential(6987).BottomSheetTitleHeader, obj), , , ];
obj1 = { style: tmp.content, children: null };
const items1 = [callback(closure_3, { source: registerAssetDefault }), ];
2026-07-29 08:29:29 +00:00
const obj3 = { variant: "heading-md/normal", style: tmp.subtitle, children: null };
const intl2 = credential(1236).intl;
obj3[2] = intl2.string(credential(1236).t.IfTbc1);
2026-08-24 06:08:38 +00:00
items1[1] = callback(credential(4739).Text, obj3);
2026-07-29 08:29:29 +00:00
obj1[1] = items1;
2026-07-20 16:05:17 +00:00
items[1] = callback2(closure_4, obj1);
2026-07-29 08:29:29 +00:00
const obj4 = { children: null };
const obj5 = { text: null, onPress: null, variant: "primary", grow: true };
const intl3 = credential(1236).intl;
obj5[0] = intl3.string(credential(1236).t["lqK//z"]);
obj5[1] = handleClose;
2026-08-24 06:08:38 +00:00
obj4[0] = callback(credential(4750).Button, obj5);
2026-07-20 16:05:17 +00:00
items[2] = callback(closure_4, obj4);
2026-07-29 08:29:29 +00:00
const obj6 = { children: null };
const obj7 = { text: null, onPress: null, variant: "destructive", disabled: null, loading: null, grow: true };
const intl4 = credential(1236).intl;
obj7[0] = intl4.string(credential(1236).t.zYOk0f);
obj7[1] = function onPress() {
2026-07-20 16:05:17 +00:00
callback(true);
2026-08-24 06:08:38 +00:00
closure_1_1(closure_1_2[5]).hideActionSheet();
let obj = closure_1_1(closure_1_2[5]);
const result = credential(closure_1_2[13]).deleteWebAuthnCredential(credential);
const obj2 = credential(closure_1_2[13]);
2026-07-20 16:05:17 +00:00
const nextPromise = result.then(() => {
2026-08-24 06:08:38 +00:00
let obj = callback2(4097);
2026-07-29 08:29:29 +00:00
obj = { key: "WEBAUTHN_CREDENTIAL_DELETE_SUCCESS_TOAST_KEY", content: null, icon: null, IconComponent: null, iconColor: "status-positive" };
const intl = callback(1236).intl;
obj[1] = intl.string(callback(1236).t.ZnkeXs);
2026-08-24 06:08:38 +00:00
obj[2] = callback2(10325);
obj[3] = callback(4339).CircleCheckIcon;
2026-07-20 16:05:17 +00:00
obj.open(obj);
});
result.then(() => {
2026-08-24 06:08:38 +00:00
let obj = callback2(4097);
2026-07-29 08:29:29 +00:00
obj = { key: "WEBAUTHN_CREDENTIAL_DELETE_SUCCESS_TOAST_KEY", content: null, icon: null, IconComponent: null, iconColor: "status-positive" };
const intl = callback(1236).intl;
obj[1] = intl.string(callback(1236).t.ZnkeXs);
2026-08-24 06:08:38 +00:00
obj[2] = callback2(10325);
obj[3] = callback(4339).CircleCheckIcon;
2026-07-20 16:05:17 +00:00
obj.open(obj);
}).catch((content) => {
2026-08-24 06:08:38 +00:00
let obj = callback2(4097);
obj = { key: "WEBAUTHN_CREDENTIAL_DELETE_ERROR_TOAST_KEY", content: content.message, icon: callback2(8953), IconComponent: callback(8117).WarningIcon, iconColor: "icon-feedback-critical" };
2026-07-20 16:05:17 +00:00
obj.open(obj);
}).finally(() => {
2026-07-29 08:29:29 +00:00
callback2(false);
2026-07-20 16:05:17 +00:00
});
};
2026-07-29 08:29:29 +00:00
obj7[3] = deleting;
obj7[4] = deleting;
2026-08-24 06:08:38 +00:00
obj6[0] = callback(credential(4750).Button, obj7);
2026-07-20 16:05:17 +00:00
items[3] = callback(closure_4, obj6);
2026-07-29 08:29:29 +00:00
obj[2] = items;
2026-08-24 06:08:38 +00:00
return callback2(credential(6988).BottomSheet, obj);
2026-07-20 16:05:17 +00:00
};