decord/source/modules/user_profile/native/UserProfileLegacyUsernameSwitch.tsx

39 lines
1.5 KiB
TypeScript
Raw Normal View History

2026-07-24 07:16:23 +00:00
// Module ID: 13660
// Function ID: 104884
2026-07-20 16:05:17 +00:00
// Name: UserProfileLegacyUsernameSwitch
2026-07-24 07:16:23 +00:00
// Dependencies: [31, 33, 3803, 13640, 1212, 9266, 7933, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-24 07:16:23 +00:00
// Module 13660 (UserProfileLegacyUsernameSwitch)
2026-07-23 10:11:24 +00:00
import "result";
import { jsx } from "jsxProd";
const require = arg1;
let result = require("explicitContentFromProto").fileFinishedImporting("modules/user_profile/native/UserProfileLegacyUsernameSwitch.tsx");
2026-07-20 16:05:17 +00:00
export default function UserProfileLegacyUsernameSwitch(username) {
const pendingLegacyUsernameDisabled = username.pendingLegacyUsernameDisabled;
2026-07-23 10:11:24 +00:00
const LegacyUsernameDisabled = setting(3803).LegacyUsernameDisabled;
setting = LegacyUsernameDisabled.useSetting();
2026-07-20 16:05:17 +00:00
let tmp2 = setting;
if (undefined !== pendingLegacyUsernameDisabled) {
tmp2 = pendingLegacyUsernameDisabled;
}
2026-07-23 10:11:24 +00:00
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 });
2026-07-20 16:05:17 +00:00
obj.onValueChange = function onValueChange(arg0) {
if (!arg0 === setting) {
2026-07-23 10:11:24 +00:00
const result = setting(outer1_1[5]).resetPendingLegacyUsernameDisabled();
const obj3 = setting(outer1_1[5]);
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
let obj = setting(outer1_1[6]);
2026-07-20 16:05:17 +00:00
obj = { legacyUsernameDisabled: !arg0 };
obj.setPendingChanges(obj);
}
};
2026-07-24 07:16:23 +00:00
return jsx(setting(13640).UserProfileEditFormSwitch, { value: !tmp2 });
2026-07-20 16:05:17 +00:00
};