2026-07-25 08:10:48 +00:00
|
|
|
// Module ID: 12951
|
|
|
|
|
// Function ID: 100516
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: UserCodeInput
|
2026-07-25 08:10:48 +00:00
|
|
|
// Dependencies: [57, 31, 27, 12952, 33, 4131, 12953, 12954, 4127, 1212, 6670, 4544, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: UserCodeInput
|
|
|
|
|
|
2026-07-25 08:10:48 +00:00
|
|
|
// Module 12951 (UserCodeInput)
|
2026-07-23 10:11:24 +00:00
|
|
|
import _slicedToArray from "_slicedToArray";
|
|
|
|
|
import result from "result";
|
|
|
|
|
import { View } from "get ActivityIndicator";
|
|
|
|
|
import { OAuthConstants } from "OAuthConstants";
|
|
|
|
|
import jsxProd from "jsxProd";
|
|
|
|
|
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose";
|
|
|
|
|
|
|
|
|
|
let closure_7;
|
|
|
|
|
let closure_8;
|
|
|
|
|
let closure_9;
|
|
|
|
|
const require = arg1;
|
|
|
|
|
({ jsx: closure_7, jsxs: closure_8, Fragment: closure_9 } = jsxProd);
|
|
|
|
|
let closure_10 = _createForOfIteratorHelperLoose.createStyles({ text: { textAlign: "center" } });
|
|
|
|
|
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) {
|
|
|
|
|
let error;
|
|
|
|
|
let manualSubmit;
|
|
|
|
|
let onClose;
|
|
|
|
|
let onUserCodeAccepted;
|
|
|
|
|
let submitting;
|
|
|
|
|
prefilledUserCode = 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-20 16:05:17 +00:00
|
|
|
let str = "";
|
|
|
|
|
if (null != prefilledUserCode) {
|
|
|
|
|
str = prefilledUserCode;
|
|
|
|
|
}
|
2026-07-23 10:11:24 +00:00
|
|
|
const tmp3 = callback(React.useState(str), 2);
|
2026-07-20 16:05:17 +00:00
|
|
|
const first = tmp3[0];
|
2026-07-23 10:11:24 +00:00
|
|
|
_require = tmp3[1];
|
2026-07-25 08:10:48 +00:00
|
|
|
let obj = _require(12953);
|
2026-07-20 16:05:17 +00:00
|
|
|
const userCodeSubmit = obj.useUserCodeSubmit(first, onUserCodeAccepted, onClose);
|
|
|
|
|
obj = {};
|
2026-07-25 08:10:48 +00:00
|
|
|
obj = { style: importDefault(12954).innerContent };
|
2026-07-20 16:05:17 +00:00
|
|
|
({ manualSubmit, error, submitting } = userCodeSubmit);
|
2026-07-23 10:11:24 +00:00
|
|
|
const obj1 = { variant: "heading-lg/bold", color: "mobile-text-heading-primary", style: tmp.text };
|
|
|
|
|
const intl = _require(1212).intl;
|
|
|
|
|
obj1.children = intl.string(_require(1212).t.KYPNUv);
|
2026-07-25 08:10:48 +00:00
|
|
|
const items = [callback2(_require(4127).Text, obj1), ];
|
2026-07-23 10:11:24 +00:00
|
|
|
const obj2 = { variant: "text-md/medium", color: "text-default", style: tmp.text };
|
|
|
|
|
const intl2 = _require(1212).intl;
|
|
|
|
|
obj2.children = intl2.string(_require(1212).t.xRHk7f);
|
2026-07-25 08:10:48 +00:00
|
|
|
items[1] = callback2(_require(4127).Text, obj2);
|
2026-07-20 16:05:17 +00:00
|
|
|
obj.children = 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) {
|
|
|
|
|
return callback(arg0);
|
|
|
|
|
},
|
|
|
|
|
maxLength: OAuthConstants.USER_CODE_LENGTH,
|
|
|
|
|
value: first,
|
|
|
|
|
autoFocus: true,
|
|
|
|
|
autoComplete: "off"
|
|
|
|
|
};
|
2026-07-23 10:11:24 +00:00
|
|
|
const intl3 = _require(1212).intl;
|
|
|
|
|
obj3.placeholder = intl3.formatToPlainString(_require(1212).t["0tbz6x"], { number: OAuthConstants.USER_CODE_LENGTH });
|
2026-07-20 16:05:17 +00:00
|
|
|
obj3.errorMessage = error;
|
2026-07-25 08:10:48 +00:00
|
|
|
items1[1] = callback2(_require(6670).TextInput, obj3);
|
2026-07-20 16:05:17 +00:00
|
|
|
const obj5 = { size: "lg" };
|
2026-07-23 10:11:24 +00:00
|
|
|
const intl4 = _require(1212).intl;
|
|
|
|
|
obj5.text = intl4.string(_require(1212).t["3PatSz"]);
|
2026-07-20 16:05:17 +00:00
|
|
|
obj5.onPress = manualSubmit;
|
|
|
|
|
obj5.loading = submitting;
|
|
|
|
|
obj5.disabled = first.length !== OAuthConstants.USER_CODE_LENGTH;
|
|
|
|
|
obj5.grow = true;
|
2026-07-25 08:10:48 +00:00
|
|
|
items1[2] = callback2(_require(4544).Button, obj5);
|
2026-07-20 16:05:17 +00:00
|
|
|
obj.children = items1;
|
2026-07-23 10:11:24 +00:00
|
|
|
return callback3(closure_9, obj);
|
2026-07-20 16:05:17 +00:00
|
|
|
};
|