import{_ as I}from"./ChatPanel.vue_vue_type_script_setup_true_lang--s1gqUGM.js";import{d as R,ak as S,al as V,J as p,I as w,k as n,c as f,a,t as C,e as x,z as B,r as g,g as o,o as v,V as $,a7 as y,a1 as _}from"./index-zfm-9r65.js";const N={class:"flex h-full flex-col"},P={class:"border-b border-slate-800 px-6 py-3"},M={class:"text-xs uppercase tracking-wide text-slate-400"},z={class:"mt-1 flex min-h-8 items-center"},D={class:"text-lg font-semibold text-slate-100"},E={class:"min-h-0 flex-1"},U=R({__name:"ChannelView",props:{communityId:{},channelId:{},community:{},channel:{}},setup(e){const r=e,l=S(),i=V(),t=g(null),s=g(null),d=o(()=>$.value===`${r.communityId}:${r.channelId}`),k=o(()=>r.channel?.capabilities.includes("screenshare")??!1),u=o(()=>k.value&&y.value!==null&&(y.value==="broadcast"||_.value!==null)),b=o(()=>{if(y.value==="broadcast")return"Your screen";const m=_.value;return m?`Watching ${m}`:"Screen share"});function h(){d.value&&t.value?l.attachRenderContainer(t.value):l.detachRenderContainer()}function c(){u.value&&s.value?i.attachRenderContainer(s.value,b.value):i.detachRenderContainer()}return p(()=>{h(),c()}),w(()=>{l.detachRenderContainer(),i.detachRenderContainer()}),n(d,()=>{h()}),n(t,()=>{h()}),n(u,()=>{c()}),n(s,()=>{c()}),n(b,()=>{c()}),(m,J)=>(v(),f("section",N,[a("header",P,[a("p",M,C(e.community?.name??e.communityId),1),a("div",z,[a("h1",D,"# "+C(e.channel?.name??e.channelId),1)])]),d.value?(v(),f("div",{key:0,ref_key:"videoContainer",ref:t,class:"border-b border-slate-800 bg-slate-950 p-4"},null,512)):x("",!0),u.value?(v(),f("div",{key:1,ref_key:"screenshareContainer",ref:s,class:"border-b border-slate-800 bg-slate-950 p-4"},null,512)):x("",!0),a("div",E,[B(I,{kind:"channel","community-id":e.communityId,"channel-id":e.channelId},null,8,["community-id","channel-id"])])]))}});export{U as default};
//# sourceMappingURL=ChannelView-OKQW6vBy.js.map
