decord/source/modules/user_profile/native/UserProfileLegacyUsernameSwitch.tsx
2026-07-23 10:11:24 +00:00

38 lines
1.5 KiB
TypeScript

// Module ID: 13609
// Function ID: 104560
// Name: UserProfileLegacyUsernameSwitch
// Dependencies: [31, 33, 3803, 13589, 1212, 9230, 7844, 2]
// Exports: default
// Module 13609 (UserProfileLegacyUsernameSwitch)
import "result";
import { jsx } from "jsxProd";
const require = arg1;
let result = require("explicitContentFromProto").fileFinishedImporting("modules/user_profile/native/UserProfileLegacyUsernameSwitch.tsx");
export default function UserProfileLegacyUsernameSwitch(username) {
const pendingLegacyUsernameDisabled = username.pendingLegacyUsernameDisabled;
const LegacyUsernameDisabled = setting(3803).LegacyUsernameDisabled;
setting = LegacyUsernameDisabled.useSetting();
let tmp2 = setting;
if (undefined !== pendingLegacyUsernameDisabled) {
tmp2 = pendingLegacyUsernameDisabled;
}
let obj = { value: !tmp2 };
const intl = setting(1212).intl;
obj.label = intl.string(setting(1212).t["3cWDuO"]);
const intl2 = setting(1212).intl;
obj.subLabel = intl2.formatToPlainString(setting(1212).t.aYhclf, { username: username.legacyUsername });
obj.onValueChange = function onValueChange(arg0) {
if (!arg0 === setting) {
const result = setting(outer1_1[5]).resetPendingLegacyUsernameDisabled();
const obj3 = setting(outer1_1[5]);
} else {
let obj = setting(outer1_1[6]);
obj = { legacyUsernameDisabled: !arg0 };
obj.setPendingChanges(obj);
}
};
return jsx(setting(13589).UserProfileEditFormSwitch, { value: !tmp2 });
};