decord/source/modules/user_profile/native/UserProfileLegacyUsernameSwitch.tsx
github-actions f0f877e8ce chore: update source for alpha 347.1
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4824.js (118.4 MB)
2026-09-15 14:23:42 +00:00

48 lines
2.1 KiB
TypeScript

// Module ID: 14741
// Function ID: 14742
// Name: UserProfileLegacyUsernameSwitch
// Dependencies: [19, 21, 1936, 14716, 1115, 7091, 8284, 2]
// Exports: default
// Module 14741 (UserProfileLegacyUsernameSwitch)
import UserSettingsAccountActionCreators from "UserSettingsAccountActionCreators" /* 7091 */;
import UserProfileSettingsActionCreators from "UserProfileSettingsActionCreators" /* 8284 */;
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(1936).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(1115).intl;
obj.label = intl.string(setting(1115).t["3cWDuO"]);
const intl2 = tmp(1115).intl;
if (tmp4) {
let stringResult = intl2.string(tmp(1115).t.eD6Yq0);
} else {
let obj2 = { username: pendingLegacyUsernameDisabled.legacyUsername };
stringResult = intl2.formatToPlainString(tmp(1115).t.aYhclf, obj2);
}
obj.subLabel = stringResult;
const intl3 = tmp(1115).intl;
obj.accessibilityLabel = intl3.string(setting(1115).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(14716).UserProfileEditFormSwitch, { value: !tmp4, label: null, subLabel: null, accessibilityLabel: null, onValueChange: null });
};