Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4759.js (118.4 MB)
48 lines
2.1 KiB
TypeScript
48 lines
2.1 KiB
TypeScript
// Module ID: 14672
|
|
// Function ID: 14673
|
|
// Name: UserProfileLegacyUsernameSwitch
|
|
// Dependencies: [19, 21, 1935, 14646, 1114, 6998, 8190, 2]
|
|
// Exports: default
|
|
|
|
// Module 14672 (UserProfileLegacyUsernameSwitch)
|
|
import UserSettingsAccountActionCreators from "UserSettingsAccountActionCreators" /* 6998 */;
|
|
import UserProfileSettingsActionCreators from "UserProfileSettingsActionCreators" /* 8190 */;
|
|
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(1935).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(1114).intl;
|
|
obj.label = intl.string(setting(1114).t["3cWDuO"]);
|
|
const intl2 = tmp(1114).intl;
|
|
if (tmp4) {
|
|
let stringResult = intl2.string(tmp(1114).t.eD6Yq0);
|
|
} else {
|
|
let obj2 = { username: pendingLegacyUsernameDisabled.legacyUsername };
|
|
stringResult = intl2.formatToPlainString(tmp(1114).t.aYhclf, obj2);
|
|
}
|
|
obj.subLabel = stringResult;
|
|
const intl3 = tmp(1114).intl;
|
|
obj.accessibilityLabel = intl3.string(setting(1114).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(14646).UserProfileEditFormSwitch, { value: !tmp4, label: null, subLabel: null, accessibilityLabel: null, onValueChange: null });
|
|
};
|