38 lines
1.5 KiB
TypeScript
38 lines
1.5 KiB
TypeScript
// Module ID: 13672
|
|
// Function ID: 105016
|
|
// Name: UserProfileLegacyUsernameSwitch
|
|
// Dependencies: [31, 33, 3804, 13652, 1212, 9158, 7880, 2]
|
|
// Exports: default
|
|
|
|
// Module 13672 (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(3804).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(13652).UserProfileEditFormSwitch, { value: !tmp2 });
|
|
};
|