decord/source/modules/user_profile/native/UserProfileLegacyUsernameSwitch.tsx
github-actions 4f02868c60 chore: update source for alpha 346.4
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4792.js (118.4 MB)
2026-09-11 10:30:06 +00:00

48 lines
2.1 KiB
TypeScript

// Module ID: 14699
// Function ID: 14700
// Name: UserProfileLegacyUsernameSwitch
// Dependencies: [19, 21, 1935, 14673, 1114, 7058, 8250, 2]
// Exports: default
// Module 14699 (UserProfileLegacyUsernameSwitch)
import UserSettingsAccountActionCreators from "UserSettingsAccountActionCreators" /* 7058 */;
import UserProfileSettingsActionCreators from "UserProfileSettingsActionCreators" /* 8250 */;
import noop from "module_19" /* 19 */;
require = fn;
const jsx = fn(21).jsx;
const size = fn(2);
let result = size.fileFinishedImporting("modules/user_profile/native/UserProfileLegacyUsernameSwitch.tsx");
export default function UserProfileLegacyUsernameSwitch(pendingLegacyUsernameDisabled) {
pendingLegacyUsernameDisabled = pendingLegacyUsernameDisabled.pendingLegacyUsernameDisabled;
let setting;
const LegacyUsernameDisabled = setting(1935).LegacyUsernameDisabled;
setting = LegacyUsernameDisabled.useSetting();
let tmp4 = setting;
if (undefined !== pendingLegacyUsernameDisabled) {
tmp4 = pendingLegacyUsernameDisabled;
}
let obj = { value: !tmp4, label: null, subLabel: null, accessibilityLabel: null, onValueChange: null };
const intl = tmp(1114).intl;
obj.label = intl.string(setting(1114).t["3cWDuO"]);
const intl2 = tmp(1114).intl;
if (tmp4) {
let stringResult = intl2.string(tmp(1114).t.eD6Yq0);
} else {
let obj2 = { username: pendingLegacyUsernameDisabled.legacyUsername };
stringResult = intl2.formatToPlainString(tmp(1114).t.aYhclf, obj2);
}
obj.subLabel = stringResult;
const intl3 = tmp(1114).intl;
obj.accessibilityLabel = intl3.string(setting(1114).t["3cWDuO"]);
obj.onValueChange = function onValueChange(arg0) {
if (!arg0 === setting) {
const result = UserSettingsAccountActionCreators.resetPendingLegacyUsernameDisabled();
} else {
const obj2 = { legacyUsernameDisabled: !arg0 };
UserProfileSettingsActionCreators.setPendingChanges(obj2);
}
};
return jsx(setting(14673).UserProfileEditFormSwitch, { value: !tmp4, label: null, subLabel: null, accessibilityLabel: null, onValueChange: null });
};