decord/source/modules/guild_settings_picker/GuildSettingsPickerFeatures.tsx

88 lines
2.8 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 13443
// Function ID: 13444
2026-07-20 16:05:17 +00:00
// Name: useGuildSettingsPickerFeature
2026-08-25 06:04:03 +00:00
// Dependencies: [32, 19, 4025, 13444, 13445, 1236, 589, 2]
2026-07-20 16:05:17 +00:00
// Exports: useGuildSettingsPickerFeature
2026-08-25 06:04:03 +00:00
// Module 13443 (useGuildSettingsPickerFeature)
2026-08-24 06:08:38 +00:00
import initialize from "initialize" /* 589 */;
import getSystemLocale from "getSystemLocale" /* 1236 */;
2026-08-25 06:04:03 +00:00
import _modDef13444 from "module_13444" /* 13444 */;
import _modDef13445 from "module_13445" /* 13445 */;
2026-08-24 06:08:38 +00:00
import closure_2 from "_slicedToArray" /* 32 */;
import closure_3 from "noop" /* 19 */;
2026-08-25 06:04:03 +00:00
import closure_4 from "getUncachedChannelPermissions" /* 4025 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-08-25 06:04:03 +00:00
let obj = { "server-subscriptions-onboarding": _modDef13444, "server-subscriptions-create-tier-from-template": _modDef13445 };
2026-07-20 16:05:17 +00:00
let closure_6 = {
title() {
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
return intl.string(getSystemLocale.t.V42OaH);
2026-07-20 16:05:17 +00:00
},
description() {
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
return intl.string(getSystemLocale.t["7dJ16X"]);
2026-07-20 16:05:17 +00:00
},
selectGuildCta() {
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
return intl.string(getSystemLocale.t.LhlgY9);
2026-07-20 16:05:17 +00:00
},
createGuildDescription() {
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
return intl.string(getSystemLocale.t.anOisx);
2026-07-20 16:05:17 +00:00
},
createGuildCta() {
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
return intl.string(getSystemLocale.t.B44MTm);
2026-07-20 16:05:17 +00:00
},
canCreateGuild: true,
useIsGuildSupported() {
2026-08-24 06:08:38 +00:00
const items = [closure_4];
return initialize.useStateFromStores(items, () => (guild) => closure_4.canAccessGuildSettings(guild), [], initialize.statesWillNeverBeEqual);
2026-07-20 16:05:17 +00:00
}
};
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/guild_settings_picker/GuildSettingsPickerFeatures.tsx");
2026-07-20 16:05:17 +00:00
export const useGuildSettingsPickerFeature = function useGuildSettingsPickerFeature(feature) {
let tmp2;
if (null != feature) {
tmp2 = obj[feature];
}
let first = callback(React.useState(tmp2), 1)[0];
2026-08-24 06:08:38 +00:00
closure_0 = closure_6.useIsGuildSupported();
2026-07-20 16:05:17 +00:00
let isGuildSupported;
2026-07-29 08:29:29 +00:00
if (first != null) {
const useIsGuildSupported = first.useIsGuildSupported;
if (useIsGuildSupported != null) {
isGuildSupported = useIsGuildSupported();
2026-07-20 16:05:17 +00:00
}
}
2026-07-23 10:11:24 +00:00
obj = {};
2026-07-20 16:05:17 +00:00
const merged = Object.assign(closure_6);
2026-07-29 08:29:29 +00:00
if (first == null) {
2026-07-20 16:05:17 +00:00
first = {};
}
const merged1 = Object.assign(first);
obj = {
title: obj.title(),
description: obj.description(),
selectGuildCta: obj.selectGuildCta(),
createGuildDescription: obj.createGuildDescription(),
createGuildCta: obj.createGuildCta(),
canCreateGuild: obj.canCreateGuild,
isGuildSupported(arg0, arg1) {
let tmp = callback(arg0, arg1);
if (tmp) {
2026-07-29 08:29:29 +00:00
let tmp3;
if (isGuildSupported != null) {
tmp3 = isGuildSupported(arg0, arg1);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp = false !== tmp3;
2026-07-20 16:05:17 +00:00
}
return tmp;
}
};
return obj;
};