/* Metro module 14389; source: modules/guilds_bar/native/GuildsBarFolderSettingsModal.tsx; dependencies: [57, 31, 4896, 14390, 33, 7896, 7972, 1244, 1305, 14391, 5282, 566, 14388, 5280, 2] */
function _fun108920(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14586:6, offset: 0x023349d6, size: 216 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const sortedGuildStore = importDefault(4896) /* metro dependency 4896: SortedGuildStore */;
const env0_6 = (require(14390) /* metro dependency 14390: GuildsBarConstants */).DEFAULT_FOLDER_COLOR;
const value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guilds_bar/native/GuildsBarFolderSettingsModal.tsx');
exports.default = GuildFolderSettingsModal;
}
function GuildFolderSettingsScene({name, onNameChange, color, onColorChange}) { // fn#108921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14586:184, offset: 0x02334aae, size: 420 bytes, params: 2, frame: 31
const Form = (require(7972) /* metro dependency 7972: native */).Form;
const FormSection = (require(7972) /* metro dependency 7972: native */).FormSection;
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object.title = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.tGRbjA]);
const FormInput = (require(7972) /* metro dependency 7972: native */).FormInput;
string = intl.string;
const xV9hVh = (require(1244) /* metro dependency 1244: indexNative */).t.xV9hVh;
const ClearButtonVisibility = (require(1305) /* metro dependency 1305: native */).ClearButtonVisibility;
const WITH_CONTENT = ClearButtonVisibility.WITH_CONTENT;
return (
);
}
function GuildFolderSettingsModal({folderId}) { // fn#108922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14586:821, offset: 0x02334c52, size: 365 bytes, params: 2, frame: 23
const {initialFolderName,
initialFolderColor} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([SortedGuildStore],
function() {
var r5;
var value3 = SortedGuildStore.getGuildFolderById(folderId);
var value4 = undefined;
r5 = value3 == null ? value4 : value3.folderName;
r5 = r5 != null ? value3.folderName : '';
return {initialFolderName: r5,
initialFolderColor: (value3 == null ? value4 : value3.folderColor) != null ? value3.folderColor : DEFAULT_FOLDER_COLOR};
}, [folderId]);
let binding = env0_4;
let useState = binding.useState;
let value3 = Reflect.apply(useState, binding, [initialFolderName]);
const binding2 = env0_3;
let value4 = binding2(value3, 2);
const property = value4[0];
const env0_2 = value4[1];
useState = binding.useState;
const value5 = binding2(Reflect.apply(useState, binding, [initialFolderColor]), 2);
const property2 = value5[0];
var env0_4 = value5[1];
const r8 = property !== initialFolderName || property2 !== initialFolderColor;
binding = env0_4;
const value10 = binding.useMemo(_fun108928, [property2, property, r8, binding.useCallback(_fun108924, [folderId,
property, property2]), binding.useCallback(_fun108927, [])]);
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
return ;
}
function _fun108924() { // fn#108924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14586:1261, offset: 0x02334e27, size: 68 bytes, params: 1, frame: 15
var environment;
updateFolder(folderId, env0_1, env0_3);
const value = environment.__proto__;
(require(14388) /* metro dependency 14388: GuildsBarFolderSettingsModalActionCreators */).hideGuildsBarFolderModal();
}
function _fun108927() { // fn#108927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14586:1475, offset: 0x02334f09, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(require(14388) /* metro dependency 14388: GuildsBarFolderSettingsModalActionCreators */).hideGuildsBarFolderModal();
}
function _fun108928() { // fn#108928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14586:1535, offset: 0x02334f2e, size: 77 bytes, params: 1, frame: 17
return getScreens_108929({name: env0_1, onNameChange: onNameChange, color: env0_3, onColorChange: onColorChange},
env0_5, env0_6, env0_7);
}
function updateFolder(a0, a1, a2) { // fn#108925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14586:1267, offset: 0x02334e6b, size: 92 bytes, params: 4, frame: 14
var environment;
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
let value = environment.__proto__.__proto__;
const userSettingsActionCreatorsModule = require(7896) /* metro dependency 7896: UserSettingsActionCreators */;
const saveGuildFolders = userSettingsActionCreatorsModule.saveGuildFolders;
value = SortedGuildStore.getGuildFolders();
Reflect.apply(saveGuildFolders, userSettingsActionCreatorsModule, [value.map(_fun108926)]);
}
function getScreens_108929(a0, a1, a2, a3) { // fn#108929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14586:1539, offset: 0x02334f7b, size: 229 bytes, params: 5, frame: 20
var environment;
var r1;
const env0_0 = a0;
const object = {render: render_108930};
let value = environment.__proto__.__proto__;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const Dx7im5 = t.Dx7im5;
object.title = Reflect.apply(string, intl, [Dx7im5]);
object.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(a3);
if (a1) {
value = require(5282) /* metro dependency 5282: NavigatorHeaderNative */;
value = value.getHeaderTextButton(intl.string(t['R3BPH+']), a2);
r1 = value;
} else {
r1 = function() {
return null;
};
}
object.headerRight = r1;
return {['Folder Settings']: object};
}
function onNameChange(a0) { // fn#108932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14586:1834, offset: 0x02335085, size: 19 bytes, params: 2, frame: 11
return env1_2(a0);
}
function _fun108926(a0) { // fn#108926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14586:1346, offset: 0x02334ec7, size: 66 bytes, params: 2, frame: 14
var r0;
var object2;
const value = a0;
const folderId = value.folderId;
if (folderId !== env0_0) {
r0 = value;
} else {
object2 = {};
copyDataProperties(object2, value, folderId);
object2['folderName'] = require;
object2['folderColor'] = importDefault;
r0 = object2;
}
return r0;
}
function getScreens_108929Render() { // fn#108930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14586:1587, owner: getScreens_108929.render, offset: 0x02335060, size: 37 bytes, params: 1, frame: 13
return ;
}