2026-09-18 06:58:00 +00:00
|
|
|
// Module ID: 14859
|
|
|
|
|
// Function ID: 14860
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: UserProfileLegacyUsernameSwitch
|
2026-09-18 06:58:00 +00:00
|
|
|
// Dependencies: [19, 21, 1936, 14834, 1115, 7180, 8394, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: default
|
|
|
|
|
|
2026-09-18 06:58:00 +00:00
|
|
|
// Module 14859 (UserProfileLegacyUsernameSwitch)
|
|
|
|
|
import UserSettingsAccountActionCreators from "UserSettingsAccountActionCreators" /* 7180 */;
|
|
|
|
|
import UserProfileSettingsActionCreators from "UserProfileSettingsActionCreators" /* 8394 */;
|
2026-09-10 05:38:07 +00:00
|
|
|
import noop from "module_19" /* 19 */;
|
2026-07-23 10:11:24 +00:00
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
require = fn;
|
|
|
|
|
const jsx = fn(21).jsx;
|
|
|
|
|
const size = fn(2);
|
|
|
|
|
let result = size.fileFinishedImporting("modules/user_profile/native/UserProfileLegacyUsernameSwitch.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-09-01 10:26:29 +00:00
|
|
|
export default function UserProfileLegacyUsernameSwitch(pendingLegacyUsernameDisabled) {
|
|
|
|
|
pendingLegacyUsernameDisabled = pendingLegacyUsernameDisabled.pendingLegacyUsernameDisabled;
|
2026-07-29 08:29:29 +00:00
|
|
|
let setting;
|
2026-09-15 14:23:42 +00:00
|
|
|
const LegacyUsernameDisabled = setting(1936).LegacyUsernameDisabled;
|
2026-07-23 10:11:24 +00:00
|
|
|
setting = LegacyUsernameDisabled.useSetting();
|
2026-07-29 08:29:29 +00:00
|
|
|
let tmp4 = setting;
|
2026-07-20 16:05:17 +00:00
|
|
|
if (undefined !== pendingLegacyUsernameDisabled) {
|
2026-07-29 08:29:29 +00:00
|
|
|
tmp4 = pendingLegacyUsernameDisabled;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-09-01 10:26:29 +00:00
|
|
|
let obj = { value: !tmp4, label: null, subLabel: null, accessibilityLabel: null, onValueChange: null };
|
2026-09-15 14:23:42 +00:00
|
|
|
const intl = tmp(1115).intl;
|
|
|
|
|
obj.label = intl.string(setting(1115).t["3cWDuO"]);
|
|
|
|
|
const intl2 = tmp(1115).intl;
|
2026-09-01 10:26:29 +00:00
|
|
|
if (tmp4) {
|
2026-09-15 14:23:42 +00:00
|
|
|
let stringResult = intl2.string(tmp(1115).t.eD6Yq0);
|
2026-09-01 10:26:29 +00:00
|
|
|
} else {
|
2026-09-10 05:38:07 +00:00
|
|
|
let obj2 = { username: pendingLegacyUsernameDisabled.legacyUsername };
|
2026-09-15 14:23:42 +00:00
|
|
|
stringResult = intl2.formatToPlainString(tmp(1115).t.aYhclf, obj2);
|
2026-09-01 10:26:29 +00:00
|
|
|
}
|
2026-09-10 05:38:07 +00:00
|
|
|
obj.subLabel = stringResult;
|
2026-09-15 14:23:42 +00:00
|
|
|
const intl3 = tmp(1115).intl;
|
|
|
|
|
obj.accessibilityLabel = intl3.string(setting(1115).t["3cWDuO"]);
|
2026-09-10 05:38:07 +00:00
|
|
|
obj.onValueChange = function onValueChange(arg0) {
|
2026-07-20 16:05:17 +00:00
|
|
|
if (!arg0 === setting) {
|
2026-09-10 05:38:07 +00:00
|
|
|
const result = UserSettingsAccountActionCreators.resetPendingLegacyUsernameDisabled();
|
2026-07-20 16:05:17 +00:00
|
|
|
} else {
|
2026-09-10 05:38:07 +00:00
|
|
|
const obj2 = { legacyUsernameDisabled: !arg0 };
|
|
|
|
|
UserProfileSettingsActionCreators.setPendingChanges(obj2);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
};
|
2026-09-18 06:58:00 +00:00
|
|
|
return jsx(setting(14834).UserProfileEditFormSwitch, { value: !tmp4, label: null, subLabel: null, accessibilityLabel: null, onValueChange: null });
|
2026-07-20 16:05:17 +00:00
|
|
|
};
|