decord/source/modules/phone/native/PhoneOrEmailInput.tsx

155 lines
4.5 KiB
TypeScript
Raw Normal View History

2026-07-25 08:10:48 +00:00
// Module ID: 9142
2026-07-27 11:26:19 +00:00
// Function ID: 71802
2026-07-25 08:10:48 +00:00
// Dependencies: [57, 31, 33, 9143, 8193, 1212, 9144, 2]
2026-07-20 16:05:17 +00:00
2026-07-25 08:10:48 +00:00
// Module 9142
2026-07-23 10:11:24 +00:00
import _slicedToArray from "_slicedToArray";
import importAllResult from "result";
import { jsx } from "jsxProd";
const require = arg1;
2026-07-20 16:05:17 +00:00
const forwardRefResult = importAllResult.forwardRef((onChange) => {
let alpha2;
2026-07-23 10:11:24 +00:00
let closure_4;
2026-07-20 16:05:17 +00:00
let countryCode;
let tmp4;
onChange = onChange.onChange;
({ alpha2, countryCode } = onChange);
const onPressCountrySelector = onChange.onPressCountrySelector;
const forceMode = onChange.forceMode;
2026-07-23 10:11:24 +00:00
let obj = { onChange: 0, alpha2: 0, countryCode: 0, onPressCountrySelector: 0, forceMode: 0 };
2026-07-20 16:05:17 +00:00
Object.setPrototypeOf(null);
const merged = Object.assign(onChange, obj);
let combined;
2026-07-23 10:11:24 +00:00
[tmp4, closure_4] = forceMode(importAllResult.useState(""), 2);
2026-07-20 16:05:17 +00:00
const ref = importAllResult.useRef(null);
const imperativeHandle = importAllResult.useImperativeHandle(arg1, () => ({
blur() {
2026-07-23 10:11:24 +00:00
const current = outer1_5.current;
2026-07-20 16:05:17 +00:00
let blurResult;
if (null != current) {
blurResult = current.blur();
}
return blurResult;
},
focus() {
2026-07-23 10:11:24 +00:00
const current = outer1_5.current;
2026-07-20 16:05:17 +00:00
let focusResult;
if (null != current) {
focusResult = current.focus();
}
return focusResult;
},
isFocused() {
2026-07-23 10:11:24 +00:00
const current = outer1_5.current;
2026-07-20 16:05:17 +00:00
let isFocusedResult;
if (null != current) {
isFocusedResult = current.isFocused();
}
return null != isFocusedResult && isFocusedResult;
},
setText(arg0) {
2026-07-23 10:11:24 +00:00
outer1_4(arg0);
const current = outer1_5.current;
2026-07-20 16:05:17 +00:00
if (null != current) {
current.setText(arg0);
}
},
getText() {
2026-07-23 10:11:24 +00:00
const current = outer1_5.current;
2026-07-20 16:05:17 +00:00
let text;
if (null != current) {
text = current.getText();
}
let str = "";
if (null != text) {
str = text;
}
return str;
},
measure(arg0) {
2026-07-23 10:11:24 +00:00
const current = outer1_5.current;
2026-07-20 16:05:17 +00:00
let measureResult;
if (null != current) {
measureResult = current.measure(arg0);
}
return measureResult;
},
measureInWindow(arg0) {
2026-07-23 10:11:24 +00:00
const current = outer1_5.current;
2026-07-20 16:05:17 +00:00
let measureInWindowResult;
if (null != current) {
measureInWindowResult = current.measureInWindow(arg0);
}
return measureInWindowResult;
},
measureLayout(arg0, arg1, arg2) {
2026-07-23 10:11:24 +00:00
const current = outer1_5.current;
2026-07-20 16:05:17 +00:00
let measureLayoutResult;
if (null != current) {
measureLayoutResult = current.measureLayout(arg0, arg1, arg2);
}
return measureLayoutResult;
}
}), []);
2026-07-23 10:11:24 +00:00
const tmp3 = forceMode(importAllResult.useState(""), 2);
2026-07-20 16:05:17 +00:00
const items = [countryCode, forceMode, onChange];
2026-07-23 10:11:24 +00:00
const result = onChange(onPressCountrySelector[3]).shouldShowCountryCodeSelector(forceMode, tmp4);
const callback = importAllResult.useCallback((value) => {
2026-07-20 16:05:17 +00:00
callback(value);
let str = "";
if (obj.shouldShowCountryCodeSelector(forceMode, value)) {
str = countryCode;
}
if (null != onChange) {
onChange(value, str);
}
}, items);
2026-07-23 10:11:24 +00:00
const tmp9 = countryCode(onPressCountrySelector[4])(callback);
let closure_6 = tmp9;
2026-07-20 16:05:17 +00:00
const items1 = [countryCode, tmp9];
const effect = importAllResult.useEffect(() => {
const current = ref.current;
let text;
if (null != current) {
text = current.getText();
}
let str = "";
if (null != text) {
str = text;
}
2026-07-23 10:11:24 +00:00
closure_6(str);
2026-07-20 16:05:17 +00:00
}, items1);
combined = undefined;
if (result) {
let str = "";
if (null != alpha2) {
str = alpha2;
}
const _HermesInternal = HermesInternal;
combined = "" + str + " " + countryCode;
}
const items2 = [combined, onPressCountrySelector];
const memo = importAllResult.useMemo(() => {
const obj = { onPress: onPressCountrySelector, accessibilityRole: "button" };
let str = "";
if (null != combined) {
str = combined;
}
obj.accessibilityLabel = str;
const intl = onChange(onPressCountrySelector[5]).intl;
obj.accessibilityHint = intl.string(onChange(onPressCountrySelector[5]).t.GwAW3k);
return obj;
}, items2);
obj = {};
const merged1 = Object.assign(merged);
obj["ref"] = ref;
obj["onChange"] = callback;
obj["leadingText"] = combined;
obj["leadingPressableProps"] = memo;
2026-07-23 10:11:24 +00:00
return ref(onChange(onPressCountrySelector[6]).SplitTextInput, obj);
2026-07-20 16:05:17 +00:00
});
2026-07-23 10:11:24 +00:00
let result = require("jsxProd").fileFinishedImporting("modules/phone/native/PhoneOrEmailInput.tsx");
2026-07-20 16:05:17 +00:00
export default forwardRefResult;