decord/source/modules/activate_device/native/UserCodeInput.tsx

79 lines
2.8 KiB
TypeScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 13107
// Function ID: 13108
2026-07-20 16:05:17 +00:00
// Name: UserCodeInput
2026-08-05 07:35:12 +00:00
// Dependencies: [32, 19, 17, 13108, 21, 4255, 13109, 13110, 4251, 1236, 7685, 4665, 2]
2026-07-20 16:05:17 +00:00
// Exports: UserCodeInput
2026-08-05 07:35:12 +00:00
// Module 13107 (UserCodeInput)
2026-07-23 10:11:24 +00:00
import _slicedToArray from "_slicedToArray";
2026-07-29 08:29:29 +00:00
import noop from "noop";
2026-07-23 10:11:24 +00:00
import { View } from "get ActivityIndicator";
import { OAuthConstants } from "OAuthConstants";
import jsxProd from "jsxProd";
2026-07-29 08:29:29 +00:00
import createCacheKey from "createCacheKey";
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
let c9;
let error;
let metroImportAll;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
({ jsx: error, jsxs: metroImportAll, Fragment: c9 } = jsxProd);
let closure_10 = createCacheKey.createStyles({ text: { textAlign: "center" } });
2026-07-23 10:11:24 +00:00
const result = require("get ActivityIndicator").fileFinishedImporting("modules/activate_device/native/UserCodeInput.tsx");
2026-07-20 16:05:17 +00:00
export const UserCodeInput = function UserCodeInput(prefilledUserCode) {
2026-07-29 08:29:29 +00:00
let arr;
let c0;
2026-07-20 16:05:17 +00:00
let error;
let manualSubmit;
let onClose;
let onUserCodeAccepted;
let submitting;
2026-07-29 08:29:29 +00:00
let str = prefilledUserCode.prefilledUserCode;
2026-07-23 10:11:24 +00:00
let _require;
2026-07-20 16:05:17 +00:00
({ onClose, onUserCodeAccepted } = prefilledUserCode);
2026-07-23 10:11:24 +00:00
const tmp = callback4();
2026-07-29 08:29:29 +00:00
if (str == null) {
str = "";
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
[arr, c0] = callback(React.useState(str), 2);
2026-08-05 07:35:12 +00:00
let obj = _require(13109);
2026-07-29 08:29:29 +00:00
const userCodeSubmit = obj.useUserCodeSubmit(arr, onUserCodeAccepted, onClose);
obj = { children: null };
2026-08-05 07:35:12 +00:00
obj = { style: importDefault(13110).innerContent, children: null };
2026-07-20 16:05:17 +00:00
({ manualSubmit, error, submitting } = userCodeSubmit);
2026-07-29 08:29:29 +00:00
const obj1 = { variant: "heading-lg/bold", color: "mobile-text-heading-primary", style: tmp.text, children: null };
const intl = _require(1236).intl;
obj1[3] = intl.string(_require(1236).t.KYPNUv);
2026-08-05 07:35:12 +00:00
const items = [callback2(_require(4251).Text, obj1), ];
2026-07-29 08:29:29 +00:00
const obj2 = { variant: "text-md/medium", color: "text-default", style: tmp.text, children: null };
const intl2 = _require(1236).intl;
obj2[3] = intl2.string(_require(1236).t.xRHk7f);
2026-08-05 07:35:12 +00:00
items[1] = callback2(_require(4251).Text, obj2);
2026-07-29 08:29:29 +00:00
obj[1] = items;
2026-07-23 10:11:24 +00:00
const items1 = [callback3(View, obj), , ];
2026-07-20 16:05:17 +00:00
const obj3 = {
onChange(arg0) {
2026-07-29 08:29:29 +00:00
return _undefined(arg0);
2026-07-20 16:05:17 +00:00
},
maxLength: OAuthConstants.USER_CODE_LENGTH,
2026-07-29 08:29:29 +00:00
value: arr,
2026-07-20 16:05:17 +00:00
autoFocus: true,
2026-07-29 08:29:29 +00:00
autoComplete: "off",
placeholder: null,
errorMessage: null
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
const intl3 = _require(1236).intl;
obj3[5] = intl3.formatToPlainString(_require(1236).t["0tbz6x"], { number: OAuthConstants.USER_CODE_LENGTH });
obj3[6] = error;
2026-08-05 07:35:12 +00:00
items1[1] = callback2(_require(7685).TextInput, obj3);
2026-07-29 08:29:29 +00:00
const obj5 = { size: "lg", text: null, onPress: null, loading: null, disabled: null, grow: true };
const intl4 = _require(1236).intl;
obj5[1] = intl4.string(_require(1236).t["3PatSz"]);
obj5[2] = manualSubmit;
obj5[3] = submitting;
obj5[4] = arr.length !== OAuthConstants.USER_CODE_LENGTH;
2026-08-05 07:35:12 +00:00
items1[2] = callback2(_require(4665).Button, obj5);
2026-07-29 08:29:29 +00:00
obj[0] = items1;
2026-07-23 10:11:24 +00:00
return callback3(closure_9, obj);
2026-07-20 16:05:17 +00:00
};