// Module ID: 15419 // Function ID: 15420 // Name: useFirstGloballyViewbleGuildChannelId // Dependencies: [1982, 505, 589, 4030, 2] // Exports: useFirstGloballyViewbleGuildChannelId // Module 15419 (useFirstGloballyViewbleGuildChannelId) import closure_3 from "comparator" /* 1982 */; import { Permissions } from "sum" /* 505 */; const require = arg1; const result = require("set").fileFinishedImporting("modules/permissions/useFirstGloballyViewbleGuildChannelId.tsx"); export const useFirstGloballyViewbleGuildChannelId = function useFirstGloballyViewbleGuildChannelId(guildId) { const _require = guildId; const items = [closure_3]; const items1 = [guildId]; return _require(589).useStateFromStores(items, () => { if (null != closure_0) { const selectableChannels = closure_1_3.getSelectableChannels(tmp); for (const item10010 of selectableChannels) { let channel = item10010.channel; let tmp6 = channel; let tmp7 = closure_1_1; let tmp8 = closure_1_2; let obj2 = closure_1_1(closure_1_2[3]); let tmp9 = closure_1_4; if (obj2.canEveryone(closure_1_4.VIEW_CHANNEL, channel)) { let tmp10 = obj; obj.return(); return channel.id; } } let id; if (selectableChannels != null) { const first = selectableChannels[0]; if (first != null) { id = first.channel.id; } } return id; } }, items1); };