decord/beta/source/modules/webauthn/native/WebAuthnDeleteActionSheet.tsx
github-actions 84d017ff78 chore: update source for beta 348.6
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5021.js (118.4 MB)
2026-09-28 16:18:32 +00:00

89 lines
4.5 KiB
TypeScript

// Module ID: 14229
// Function ID: 14230
// Name: WebAuthnDeleteActionSheet
// Dependencies: [19, 17, 21, 4836, 576, 4800, 6571, 6570, 1115, 6619, 4832, 5281, 6014, 4528, 10115, 4792, 8905, 8048, 2]
// Exports: default
// Module 14229 (WebAuthnDeleteActionSheet)
import nativeDefault from "native" /* 576 */;
import ActionSheetActionCreatorsDefault from "ActionSheetActionCreators" /* 4800 */;
import WebAuthnActionCreators from "WebAuthnActionCreators" /* 6014 */;
import noop from "module_19" /* 19 */;
require = fn;
const View = fn(17).View;
const jsxProd = fn(21);
({ jsx: closure_4, jsxs: hasOwnProperty } = jsxProd);
const createStyles = fn(4836);
let obj2 = { content: { alignItems: "center" }, subtitle: { textAlign: "center", marginTop: nativeDefault.space.PX_16 }, sheetContent: null, sheetBody: null };
const obj3 = { textAlign: "center", marginTop: nativeDefault.space.PX_16 };
obj2.sheetContent = { paddingHorizontal: nativeDefault.space.PX_16, paddingBottom: nativeDefault.space.PX_16 };
let obj4 = { paddingHorizontal: nativeDefault.space.PX_16, paddingBottom: nativeDefault.space.PX_16 };
obj2.sheetBody = { gap: nativeDefault.space.PX_16, paddingBottom: nativeDefault.space.PX_16 };
let closure_6 = createStyles.createStyles(obj2);
const size = fn(2);
let result = size.fileFinishedImporting("modules/webauthn/native/WebAuthnDeleteActionSheet.tsx");
export default function WebAuthnDeleteActionSheet(credential) {
credential = credential.credential;
({ deleting, setDeleting: importDefault } = credential);
function handleClose() {
ActionSheetActionCreatorsDefault.hideActionSheet();
}
const tmp = closure_6();
let obj = { contentStyles: tmp.sheetContent, bodyStyles: tmp.sheetBody, children: null };
let obj2 = { title: null, trailing: null };
let intl = credential(1115).intl;
obj2.title = intl.formatToPlainString(credential(1115).t.mI3CoL, { keyName: credential.name });
obj2.trailing = closure_4(credential(6619).ActionSheetCloseButton, { onPress: handleClose });
const items = [closure_4(credential(6570).BottomSheetTitleHeader, obj2), , , ];
const obj4 = { style: tmp.content, children: null };
const obj5 = { variant: "heading-md/normal", style: tmp.subtitle, children: null };
const intl2 = credential(1115).intl;
obj5.children = intl2.string(credential(1115).t.IfTbc1);
obj4.children = closure_4(credential(4832).Text, obj5);
items[1] = closure_4(View, obj4);
const obj6 = { children: null };
const obj7 = { text: null, onPress: null, variant: "primary", grow: true };
const intl3 = credential(1115).intl;
obj7.text = intl3.string(credential(1115).t["lqK//z"]);
obj7.onPress = handleClose;
obj6.children = closure_4(credential(5281).Button, obj7);
items[2] = closure_4(View, obj6);
const obj8 = { children: null };
const obj9 = { text: null, onPress: null, variant: "destructive", disabled: null, loading: null, grow: true };
const intl4 = credential(1115).intl;
obj9.text = intl4.string(credential(1115).t.zYOk0f);
obj9.onPress = function onPress() {
closure_1_1(true);
ActionSheetActionCreatorsDefault.hideActionSheet();
const result = WebAuthnActionCreators.deleteWebAuthnCredential(credential);
const nextPromise = result.then(() => {
const obj2 = { key: "WEBAUTHN_CREDENTIAL_DELETE_SUCCESS_TOAST_KEY", content: null, icon: null, IconComponent: null, iconColor: "status-positive" };
const intl = credential(1115).intl;
obj2.content = intl.string(credential(1115).t.ZnkeXs);
obj2.icon = closure_1_1(10115);
obj2.IconComponent = credential(4792).CircleCheckIcon;
closure_1_1(4528).open(obj2);
});
result.then(() => {
const obj2 = { key: "WEBAUTHN_CREDENTIAL_DELETE_SUCCESS_TOAST_KEY", content: null, icon: null, IconComponent: null, iconColor: "status-positive" };
const intl = credential(1115).intl;
obj2.content = intl.string(credential(1115).t.ZnkeXs);
obj2.icon = closure_1_1(10115);
obj2.IconComponent = credential(4792).CircleCheckIcon;
closure_1_1(4528).open(obj2);
}).catch((error) => {
const obj = closure_1_1(4528);
obj.open({ key: "WEBAUTHN_CREDENTIAL_DELETE_ERROR_TOAST_KEY", content: error.message, icon: closure_1_1(8905), IconComponent: credential(8048).WarningIcon, iconColor: "icon-feedback-critical" });
}).finally(() => {
closure_1_1(false);
});
};
obj9.disabled = deleting;
obj9.loading = deleting;
obj8.children = closure_4(credential(5281).Button, obj9);
items[3] = closure_4(View, obj8);
obj.children = items;
return closure_5(credential(6571).BottomSheet, obj);
};