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

70 lines
2.8 KiB
TypeScript
Raw Normal View History

// Module ID: 13881
// Function ID: 13882
2026-07-20 16:05:17 +00:00
// Name: UserCodeInput
// Dependencies: [32, 19, 17, 13882, 21, 4560, 13883, 13884, 4556, 1114, 6606, 4975, 2]
2026-07-20 16:05:17 +00:00
// Exports: UserCodeInput
// Module 13881 (UserCodeInput)
import innerContentDefault from "innerContent" /* 13884 */;
2026-08-24 06:08:38 +00:00
import closure_3 from "_slicedToArray" /* 32 */;
import closure_4 from "noop" /* 19 */;
import { View } from "get ActivityIndicator" /* 17 */;
import { OAuthConstants } from "OAuthConstants" /* 13882 */;
2026-08-24 06:08:38 +00:00
import jsxProd from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4560 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-08-24 06:08:38 +00:00
({ jsx: error, jsxs: closure_8, Fragment: c9 } = jsxProd);
2026-07-29 08:29:29 +00:00
let closure_10 = createCacheKey.createStyles({ text: { textAlign: "center" } });
2026-08-24 06:08:38 +00:00
const result = require("set").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 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);
let obj = _require(13883);
2026-07-29 08:29:29 +00:00
const userCodeSubmit = obj.useUserCodeSubmit(arr, onUserCodeAccepted, onClose);
obj = { children: null };
2026-08-24 06:08:38 +00:00
obj = { style: innerContentDefault.innerContent, children: null };
2026-07-20 16:05:17 +00:00
({ manualSubmit, error, submitting } = userCodeSubmit);
2026-08-24 06:08:38 +00:00
obj1 = { variant: "heading-lg/bold", color: "mobile-text-heading-primary", style: tmp.text, children: null };
const intl = _require(1114).intl;
obj1[3] = intl.string(_require(1114).t.KYPNUv);
const items = [callback2(_require(4556).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(1114).intl;
obj2[3] = intl2.string(_require(1114).t.xRHk7f);
items[1] = callback2(_require(4556).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
};
const intl3 = _require(1114).intl;
obj3[5] = intl3.formatToPlainString(_require(1114).t["0tbz6x"], { number: OAuthConstants.USER_CODE_LENGTH });
2026-07-29 08:29:29 +00:00
obj3[6] = error;
items1[1] = callback2(_require(6606).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(1114).intl;
obj5[1] = intl4.string(_require(1114).t["3PatSz"]);
2026-07-29 08:29:29 +00:00
obj5[2] = manualSubmit;
obj5[3] = submitting;
obj5[4] = arr.length !== OAuthConstants.USER_CODE_LENGTH;
items1[2] = callback2(_require(4975).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
};