/* Metro module 14726; source: modules/guild_sidebar/useGuildActionRows.tsx; dependencies: [57, 4869, 5101, 661, 11839, 6855, 6840, 6853, 6829, 5103, 632, 5104, 11810, 6856, 12310, 14555, 14691, 6858, 6857, 14727, 7013, 1365, 2] */ import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */ import GuildOnboardingHomeSettingsStore from '../guild_onboarding_home/GuildOnboardingHomeSettingsStore.tsx'; /* Metro dependency 4869 */ import UseIsNewMember from '../guild_onboarding_home/useIsNewMember.tsx'; /* Metro dependency 5104 */ import UseCanSeeEventsInChannelList from '../guild_scheduled_events/useCanSeeEventsInChannelList.tsx'; /* Metro dependency 11839 */ import UseHasAllocateBoostPermission from '../premium/powerups/hooks/useHasAllocateBoostPermission.tsx'; /* Metro dependency 12310 */ import UseTotalPossibleBoostCount from '../premium/powerups/hooks/useTotalPossibleBoostCount.tsx'; /* Metro dependency 14691 */ import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as UseStateFromStoresModule from '../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */ import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */ import * as GuildSidebarConstantsModule from './GuildSidebarConstants.tsx'; /* Metro dependency 5101 */ import * as OnboardingHomeUtilsModule from '../guild_onboarding_home/OnboardingHomeUtils.tsx'; /* Metro dependency 5103 */ import * as SlayerStorefrontUtilsModule from '../slayer_storefront/SlayerStorefrontUtils.tsx'; /* Metro dependency 6829 */ import * as UseRoleSubscriptionsVisibleInGuildModule from '../guild_role_subscriptions/useRoleSubscriptionsVisibleInGuild.tsx'; /* Metro dependency 6840 */ import * as UseGuildShopVisibleInGuildModule from '../creator_monetization/guild_shop/useGuildShopVisibleInGuild.tsx'; /* Metro dependency 6853 */ import * as CanReviewGuildMemberApplicationsModule from '../guild_member_verification/canReviewGuildMemberApplications.tsx'; /* Metro dependency 6855 */ import * as MemberSafetyPermissionsUtilsModule from '../guild_mod_dash_member_safety/MemberSafetyPermissionsUtils.tsx'; /* Metro dependency 6856 */ import * as GameServerExperimentModule from '../premium/game_server/GameServerExperiment.tsx'; /* Metro dependency 6857 */ import * as GuildOfficialMessageUtilsModule from '../messages/GuildOfficialMessageUtils.tsx'; /* Metro dependency 6858 */ import * as UseSelectedDismissibleContentModule from '../dismissible_content/hooks/useSelectedDismissibleContent.tsx'; /* Metro dependency 7013 */ import * as MemberActionUtilsModule from '../guild_onboarding_home/MemberActionUtils.tsx'; /* Metro dependency 11810 */ import * as MobileBoostProgressBarExperimentModule from '../premium/powerups/experiments/MobileBoostProgressBarExperiment.tsx'; /* Metro dependency 14555 */ import * as GameServerTabAlwaysOnExperimentModule from '../premium/game_server/experiments/GameServerTabAlwaysOnExperiment.tsx'; /* Metro dependency 14727 */ function _fun111036(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14923:6, offset: 0x02390d3b, size: 178 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); (FileImportTrackerModule).fileFinishedImporting('modules/guild_sidebar/useGuildActionRows.tsx'); exports.default = useGuildActionRows; function useGuildActionRows(a0) { // fn#111037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14923:265, offset: 0x02390ded, size: 1079 bytes, params: 2, frame: 36 var r15; const env0_0 = a0; const value2 = (UseCanSeeEventsInChannelList)(a0.id); const value3 = (CanReviewGuildMemberApplicationsModule).useCanReviewGuildMemberApplications(a0.id); const value4 = (UseRoleSubscriptionsVisibleInGuildModule).useShowRoleSubscriptionsInChannelList(a0.id); const value5 = (UseGuildShopVisibleInGuildModule).useGuildShopVisibleInGuild(a0); const hasSocialLayerStorefront2 = (SlayerStorefrontUtilsModule).hasSocialLayerStorefront(a0); const value6 = (OnboardingHomeUtilsModule).useCanSeeOnboardingHome(a0.id); const value7 = (UseStateFromStoresModule).useStateFromStores([GuildOnboardingHomeSettingsStore], _fun111038, [a0.id]); const value8 = (UseIsNewMember)(a0.id); const value9 = (MemberActionUtilsModule).useAllActionsCompleted(a0.id); (MemberSafetyPermissionsUtilsModule).useCanAccessMemberSafetyPage(a0.id); items2 = []; let features = a0.features; let has = features.has; const HUB = GuildFeatures.HUB; const value10 = Reflect.apply(has, features, [HUB]); features = a0.features; has = features.has; const COMMUNITY = GuildFeatures.COMMUNITY; const value11 = Reflect.apply(has, features, [COMMUNITY]); features = a0.features; has = features.has; const ENABLED_MODERATION_EXPERIENCE_FOR_NON_COMMUNITY = GuildFeatures.ENABLED_MODERATION_EXPERIENCE_FOR_NON_COMMUNITY; Reflect.apply(has, features, [ENABLED_MODERATION_EXPERIENCE_FOR_NON_COMMUNITY]); const value12 = (UseHasAllocateBoostPermission)(a0.id); const value13 = (MobileBoostProgressBarExperimentModule).useMobileBoostProgressBarEnabled('useGuildActionRows'); const value14 = (UseTotalPossibleBoostCount)(a0); const value15 = (GuildOfficialMessageUtilsModule).useIsGuildOfficialMessagesEnabled(a0.id, 'useGuildActionRows'); const value16 = (GameServerExperimentModule).useGameServerEnabled(a0.id, 'useGuildActionRows'); features = a0.features; has = features.has; const GAME_SERVERS = GuildFeatures.GAME_SERVERS; const value17 = Reflect.apply(has, features, [GAME_SERVERS]); const value18 = (GameServerTabAlwaysOnExperimentModule).useIsGameServerTabAlwaysOnEnabled('useGuildActionRows'); const useSelectedDismissibleContent = UseSelectedDismissibleContentModule.useSelectedDismissibleContent; const property = Module00057(Reflect.apply(useSelectedDismissibleContent, UseSelectedDismissibleContentModule, [value16 && value18 ? value17 ? [] : [(require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.EMPTY_GAME_SERVER_TAB] : [], undefined, true]), 1)[0]; if (value10) { items2.push(ChannelListGuildActionRow.GUILD_HUB_HEADER_OPTIONS); } if (value9) { r15 = a0.premiumProgressBarEnabled && value13; r15 = r15 && value14 > 0; if (r15) { items2.push(ChannelListGuildActionRow.GUILD_PREMIUM_PROGRESS_BAR); } } else if (value6) { if (value8) { if (value7 == null) { r15 = a0.premiumProgressBarEnabled && value13; r15 = r15 && value14 > 0; if (r15) { items2.push(ChannelListGuildActionRow.GUILD_PREMIUM_PROGRESS_BAR); } } else if (value7.length > 0) { items2.push(ChannelListGuildActionRow.GUILD_NEW_MEMBER_ACTIONS_PROGRESS_BAR); } else { r15 = a0.premiumProgressBarEnabled && value13; r15 = r15 && value14 > 0; if (r15) { items2.push(ChannelListGuildActionRow.GUILD_PREMIUM_PROGRESS_BAR); } } } else { r15 = a0.premiumProgressBarEnabled && value13; r15 = r15 && value14 > 0; if (r15) { items2.push(ChannelListGuildActionRow.GUILD_PREMIUM_PROGRESS_BAR); } } } else { r15 = a0.premiumProgressBarEnabled && value13; r15 = r15 && value14 > 0; if (r15) { items2.push(ChannelListGuildActionRow.GUILD_PREMIUM_PROGRESS_BAR); } } const value22 = !value10; if (value10 ? value22 : value6) { items2.push(ChannelListGuildActionRow.GUILD_HOME); } if (value2) { items2.push(ChannelListGuildActionRow.GUILD_SCHEDULED_EVENTS); } if (value10 ? value22 : value11) { items2.push(ChannelListGuildActionRow.CHANNELS_AND_ROLES); } if (value4) { items2.push(ChannelListGuildActionRow.GUILD_ROLE_SUBSCRIPTIONS); } if (value5) { items2.push(ChannelListGuildActionRow.GUILD_SHOP); } if (hasSocialLayerStorefront2) { items2.push(ChannelListGuildActionRow.GUILD_GAME_SHOP); } if (value3 && a0.features.has(GuildFeatures.MEMBER_VERIFICATION_MANUAL_APPROVAL)) { items2.push(ChannelListGuildActionRow.GUILD_MOD_DASH_MEMBER_SAFETY); } if (value12) { items2.push(ChannelListGuildActionRow.GUILD_BOOSTS); } if (value15) { items2.push(ChannelListGuildActionRow.GUILD_OFFICIAL_MESSAGES); } if (value16) { if (value17) { items2.push(ChannelListGuildActionRow.GAME_SERVERS); } else if (property != null) { items2.push(ChannelListGuildActionRow.GAME_SERVERS_EMPTY); } } return items2; function _fun111038() { // fn#111038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14923:575, offset: 0x02391224, size: 32 bytes, params: 1, frame: 11 return GuildOnboardingHomeSettingsStore.getNewMemberActions(env0_0.id); } } } global.__d(_fun111036, 14726, [57, 4869, 5101, 661, 11839, 6855, 6840, 6853, 6829, 5103, 632, 5104, 11810, 6856, 12310, 14555, 14691, 6858, 6857, 14727, 7013, 1365, 2]) /* metro module 14726, dependencies: [57, 4869, 5101, 661, 11839, 6855, 6840, 6853, 6829, 5103, 632, 5104, 11810, 6856, 12310, 14555, 14691, 6858, 6857, 14727, 7013, 1365, 2] */;