decord/source/modules/user_profile/native/UserProfileLegacyUsernameSwitch.tsx
github-actions a36fe4ec9c chore: update source for alpha 347.0
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
2026-09-14 20:04:03 +00:00

48 lines
2.1 KiB
TypeScript

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