decord/source/modules/user_profile/native/UserProfileLegacyUsernameSwitch.tsx
github-actions 20a21ad13f chore: update source for alpha 346.5
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4791.js (118.4 MB)
2026-09-11 19:12:58 +00:00

48 lines
2.1 KiB
TypeScript

// Module ID: 14696
// Function ID: 14697
// Name: UserProfileLegacyUsernameSwitch
// Dependencies: [19, 21, 1935, 14671, 1114, 7057, 8249, 2]
// Exports: default
// Module 14696 (UserProfileLegacyUsernameSwitch)
import UserSettingsAccountActionCreators from "UserSettingsAccountActionCreators" /* 7057 */;
import UserProfileSettingsActionCreators from "UserProfileSettingsActionCreators" /* 8249 */;
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(14671).UserProfileEditFormSwitch, { value: !tmp4, label: null, subLabel: null, accessibilityLabel: null, onValueChange: null });
};