2026-08-24 06:08:38 +00:00
|
|
|
// Module ID: 7254
|
|
|
|
|
// Function ID: 7255
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: computeCanEveryoneInGuildSeeRoleSubscriptions
|
2026-08-24 06:08:38 +00:00
|
|
|
// Dependencies: [1983, 1910, 676, 7255, 7256, 589, 7257, 7262, 2]
|
2026-07-29 08:29:29 +00:00
|
|
|
// Exports: areRoleSubscriptionsVisibleInGuild, useRoleSubscriptionsVisibleInGuild, useShowRoleSubscriptionsInChannelList
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-08-24 06:08:38 +00:00
|
|
|
// Module 7254 (computeCanEveryoneInGuildSeeRoleSubscriptions)
|
|
|
|
|
import useIsCreatorMonetizationEnabledGuild from "useIsCreatorMonetizationEnabledGuild" /* 7255 */;
|
|
|
|
|
import computeHasRoleSubscriptionsInGuild from "computeHasRoleSubscriptionsInGuild" /* 7256 */;
|
|
|
|
|
import computeHasRoleSubscriptionsInGuildDefault from "computeHasRoleSubscriptionsInGuild" /* 7256 */;
|
|
|
|
|
import closure_3 from "initialize" /* 1983 */;
|
|
|
|
|
import closure_4 from "createGuildRecordFromRust" /* 1910 */;
|
|
|
|
|
import { GuildFeatures } from "ME" /* 676 */;
|
2026-07-23 10:11:24 +00:00
|
|
|
|
2026-08-24 06:08:38 +00:00
|
|
|
require = arg1;
|
2026-07-29 08:29:29 +00:00
|
|
|
function computeCanEveryoneInGuildSeeRoleSubscriptions(c0) {
|
2026-07-20 16:05:17 +00:00
|
|
|
let tmp = arg1;
|
|
|
|
|
if (arg1 === undefined) {
|
2026-08-24 06:08:38 +00:00
|
|
|
const items = [closure_4, closure_3];
|
2026-07-20 16:05:17 +00:00
|
|
|
tmp = items;
|
|
|
|
|
}
|
|
|
|
|
[obj, obj2] = tmp;
|
2026-07-29 08:29:29 +00:00
|
|
|
const guild = obj.getGuild(c0);
|
2026-07-20 16:05:17 +00:00
|
|
|
if (null == guild) {
|
|
|
|
|
return false;
|
|
|
|
|
} else {
|
2026-08-24 06:08:38 +00:00
|
|
|
const result = useIsCreatorMonetizationEnabledGuild.isCreatorMonetizationEnabledGuild(guild);
|
2026-07-20 16:05:17 +00:00
|
|
|
const features = guild.features;
|
2026-07-29 08:29:29 +00:00
|
|
|
let tmp9 = !result;
|
|
|
|
|
if (result) {
|
|
|
|
|
tmp9 = !features.has(GuildFeatures.ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE);
|
|
|
|
|
}
|
2026-07-20 16:05:17 +00:00
|
|
|
let isViewingServerShopResult = !tmp9;
|
|
|
|
|
if (tmp9) {
|
2026-07-29 08:29:29 +00:00
|
|
|
isViewingServerShopResult = obj2.isViewingServerShop(c0);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
return isViewingServerShopResult;
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-08-24 06:08:38 +00:00
|
|
|
let result = require("set").fileFinishedImporting("modules/guild_role_subscriptions/useRoleSubscriptionsVisibleInGuild.tsx");
|
2026-07-29 08:29:29 +00:00
|
|
|
|
2026-08-24 06:08:38 +00:00
|
|
|
export const areRoleSubscriptionsVisibleInGuild = function areRoleSubscriptionsVisibleInGuild(c0, closure_3) {
|
2026-07-29 08:29:29 +00:00
|
|
|
let hasRoleSubscriptionsInGuild = computeCanEveryoneInGuildSeeRoleSubscriptions(c0);
|
|
|
|
|
if (!hasRoleSubscriptionsInGuild) {
|
2026-08-24 06:08:38 +00:00
|
|
|
hasRoleSubscriptionsInGuild = computeHasRoleSubscriptionsInGuild.computeHasRoleSubscriptionsInGuild(c0, closure_3);
|
|
|
|
|
const obj = computeHasRoleSubscriptionsInGuild;
|
2026-07-29 08:29:29 +00:00
|
|
|
}
|
|
|
|
|
return hasRoleSubscriptionsInGuild;
|
|
|
|
|
};
|
|
|
|
|
export const useRoleSubscriptionsVisibleInGuild = function useRoleSubscriptionsVisibleInGuild(id1) {
|
2026-07-23 10:11:24 +00:00
|
|
|
const _require = id1;
|
2026-08-24 06:08:38 +00:00
|
|
|
const tmp = computeHasRoleSubscriptionsInGuildDefault(id1);
|
|
|
|
|
const items = [closure_4, closure_3];
|
2026-07-20 16:05:17 +00:00
|
|
|
const items1 = [id1];
|
2026-07-29 08:29:29 +00:00
|
|
|
let stateFromStores = _require(589).useStateFromStores(items, () => {
|
2026-08-24 06:08:38 +00:00
|
|
|
const items = [closure_1_4, closure_1_3];
|
|
|
|
|
return closure_1_6(closure_0, items);
|
2026-07-20 16:05:17 +00:00
|
|
|
}, items1);
|
2026-07-29 08:29:29 +00:00
|
|
|
const obj = _require(589);
|
2026-08-24 06:08:38 +00:00
|
|
|
const shouldHideGuildPurchaseEntryPoints = _require(7257).useShouldHideGuildPurchaseEntryPoints(id1).shouldHideGuildPurchaseEntryPoints;
|
2026-07-29 08:29:29 +00:00
|
|
|
let tmp3 = !shouldHideGuildPurchaseEntryPoints;
|
|
|
|
|
if (!shouldHideGuildPurchaseEntryPoints) {
|
2026-07-20 16:05:17 +00:00
|
|
|
if (!stateFromStores) {
|
|
|
|
|
stateFromStores = tmp;
|
|
|
|
|
}
|
|
|
|
|
tmp3 = stateFromStores;
|
|
|
|
|
}
|
|
|
|
|
return tmp3;
|
|
|
|
|
};
|
|
|
|
|
export const useShowRoleSubscriptionsInChannelList = function useShowRoleSubscriptionsInChannelList(id) {
|
2026-07-29 08:29:29 +00:00
|
|
|
const _require = id;
|
2026-08-24 06:08:38 +00:00
|
|
|
const tmp2 = computeHasRoleSubscriptionsInGuildDefault(id);
|
2026-07-29 08:29:29 +00:00
|
|
|
const tmp3 = _require;
|
2026-08-24 06:08:38 +00:00
|
|
|
let items = [closure_4, closure_3];
|
2026-07-29 08:29:29 +00:00
|
|
|
const items1 = [id];
|
|
|
|
|
let stateFromStores = _require(589).useStateFromStores(items, () => {
|
2026-08-24 06:08:38 +00:00
|
|
|
const items = [closure_1_4, closure_1_3];
|
|
|
|
|
return closure_1_6(closure_0, items);
|
2026-07-29 08:29:29 +00:00
|
|
|
}, items1);
|
|
|
|
|
const obj = _require(589);
|
2026-08-24 06:08:38 +00:00
|
|
|
const shouldHideGuildPurchaseEntryPoints = _require(7257).useShouldHideGuildPurchaseEntryPoints(id).shouldHideGuildPurchaseEntryPoints;
|
2026-07-29 08:29:29 +00:00
|
|
|
let tmp5 = !shouldHideGuildPurchaseEntryPoints;
|
|
|
|
|
if (!shouldHideGuildPurchaseEntryPoints) {
|
|
|
|
|
if (!stateFromStores) {
|
|
|
|
|
stateFromStores = tmp2;
|
|
|
|
|
}
|
|
|
|
|
tmp5 = stateFromStores;
|
|
|
|
|
}
|
2026-08-24 06:08:38 +00:00
|
|
|
const obj2 = _require(7257);
|
|
|
|
|
const guildEligibleForGuildProducts = tmp3(7262).useGuildEligibleForGuildProducts(id);
|
2026-07-29 08:29:29 +00:00
|
|
|
if (tmp5) {
|
|
|
|
|
let flag = !guildEligibleForGuildProducts;
|
|
|
|
|
if (guildEligibleForGuildProducts) {
|
|
|
|
|
flag = true;
|
|
|
|
|
}
|
|
|
|
|
tmp5 = flag;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
return tmp5;
|
2026-07-20 16:05:17 +00:00
|
|
|
};
|