decord/source/modules/user_profile/native/UserProfileLegacyUsernameSwitch.tsx

51 lines
1.9 KiB
TypeScript
Raw Normal View History

// Module ID: 14643
// Function ID: 14644
2026-07-20 16:05:17 +00:00
// Name: UserProfileLegacyUsernameSwitch
// Dependencies: [19, 21, 1935, 14618, 1114, 6984, 8164, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 14643 (UserProfileLegacyUsernameSwitch)
2026-08-24 06:08:38 +00:00
import noopAll from "noop" /* 19 */;
import { jsx } from "jsxProd" /* 21 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-08-24 06:08:38 +00:00
noopAll;
let result = require("set").fileFinishedImporting("modules/user_profile/native/UserProfileLegacyUsernameSwitch.tsx");
2026-07-20 16:05:17 +00:00
2026-09-01 10:26:29 +00:00
export default function UserProfileLegacyUsernameSwitch(pendingLegacyUsernameDisabled) {
pendingLegacyUsernameDisabled = pendingLegacyUsernameDisabled.pendingLegacyUsernameDisabled;
2026-07-29 08:29:29 +00:00
let setting;
const LegacyUsernameDisabled = setting(1935).LegacyUsernameDisabled;
2026-07-23 10:11:24 +00:00
setting = LegacyUsernameDisabled.useSetting();
2026-07-29 08:29:29 +00:00
let tmp4 = setting;
2026-07-20 16:05:17 +00:00
if (undefined !== pendingLegacyUsernameDisabled) {
2026-07-29 08:29:29 +00:00
tmp4 = pendingLegacyUsernameDisabled;
2026-07-20 16:05:17 +00:00
}
2026-09-01 10:26:29 +00:00
let obj = { value: !tmp4, label: null, subLabel: null, accessibilityLabel: null, onValueChange: null };
const intl = tmp(1114).intl;
obj[1] = intl.string(setting(1114).t["3cWDuO"]);
const intl2 = tmp(1114).intl;
2026-09-01 10:26:29 +00:00
if (tmp4) {
let stringResult = intl2.string(tmp(1114).t.eD6Yq0);
2026-09-01 10:26:29 +00:00
} else {
obj = { username: null };
obj[0] = pendingLegacyUsernameDisabled.legacyUsername;
stringResult = intl2.formatToPlainString(tmp(1114).t.aYhclf, obj);
2026-09-01 10:26:29 +00:00
}
obj[2] = stringResult;
const intl3 = tmp(1114).intl;
obj[3] = intl3.string(setting(1114).t["3cWDuO"]);
2026-09-01 10:26:29 +00:00
obj[4] = function onValueChange(arg0) {
2026-07-20 16:05:17 +00:00
if (!arg0 === setting) {
2026-08-24 06:08:38 +00:00
const result = setting(closure_1_1[5]).resetPendingLegacyUsernameDisabled();
const obj3 = setting(closure_1_1[5]);
2026-07-20 16:05:17 +00:00
} else {
2026-08-24 06:08:38 +00:00
let obj = setting(closure_1_1[6]);
2026-07-29 08:29:29 +00:00
obj = { legacyUsernameDisabled: null };
obj[0] = !arg0;
2026-07-20 16:05:17 +00:00
obj.setPendingChanges(obj);
}
};
return jsx(setting(14618).UserProfileEditFormSwitch, { value: !tmp4, label: null, subLabel: null, accessibilityLabel: null, onValueChange: null });
2026-07-20 16:05:17 +00:00
};