Module 310953

1,470 characters · in 750f5c36c0491cec.js
Dependencies
Required by (3)
Lazily required by (0)none
Lazily requires (0)none
Source Raw
function(e,t,n){n.d(t,{A:()=>h,W:()=>A}),n(321073);var i=n(582128),l=n(17928),r=n(796637),s=n(5180),a=n(960755),o=n(95701),d=n(924985),c=n(458294),u=n(309010);function h(e){let{withVoiceChannels:t=!1,withCurrentVoiceChannel:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;return E((0,s.ai)(e)?(0,r.g)():a.A.getGuildWithoutChangingGuildActionRows(e).guildChannels,{currentVoiceChannelId:u.Ay.getVoiceChannelId(),selectedChannelId:u.Ay.getChannelId()},{withVoiceChannels:t,withCurrentVoiceChannel:n},i)}function A(e,t,n){let{withVoiceChannels:r=!1,withCurrentVoiceChannel:s=!1}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=arguments.length>4?arguments[4]:void 0,o=(0,l.bG)([c.default],()=>c.default.getGuildChangeSentinel(e)),h=(0,l.bG)([d.A],()=>d.A.version),{currentVoiceChannelId:A,selectedChannelId:g}=(0,l.cf)([u.Ay],()=>({currentVoiceChannelId:u.Ay.getVoiceChannelId(),selectedChannelId:u.Ay.getChannelId()}));return(0,i.useMemo)(()=>E(t,{currentVoiceChannelId:A,selectedChannelId:g},{withVoiceChannels:r,withCurrentVoiceChannel:s},a).map(e=>e.id),[t,n,o,h])}function E(e,t){let{currentVoiceChannelId:n,selectedChannelId:i}=t,{withVoiceChannels:l,withCurrentVoiceChannel:r}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0,a=[];return e.forEachShownChannel(e=>{((0,o.tr)(e.type)||l&&(0,o.ay)(e.type)||r&&(e.id===n||e.id===i))&&a.push(e)},s),a}}