import{v as B,$ as k,aH as N,ac as R,a8 as T,z as t,A as u,G as C,aI as $,D as r,E as a,H as s,B as M,aW as P,M as b,V as U,F as A,O as z,R as E,P as O,Q as V,J as D}from"./en-DVG-3JWZ.js";import{u as L}from"./videoChat-Dm-grs18.js";const F=["src"],H=["src"],W=B({__name:"share-preview",props:{opts:{}},emits:["selected"],setup(h,{emit:v}){const d=v,y=h,{srcId:w,name:S,thumbnailURL:p,stream:m,display_id:_,appIconURL:n,initiallySelected:o}=y.opts,e=k(o),l=N(),f=k(!1);return R(async()=>{l.value.srcObject=await m,f.value=!0}),T(async()=>{e.value||(await m).getTracks().forEach(c=>c.stop())}),(c,i)=>(t(),u("div",null,[C(r("video",{class:a(c.$style.videoPreview),ref_key:"videoTag",ref:l,playsinline:"",autoplay:"",muted:""},null,2),[[$,!!f.value]]),C(r("img",{src:s(p)},null,8,F),[[$,!f.value]]),i[2]||(i[2]=r("br",null,null,-1)),M(s(P),{class:a(c.$style.inline),modelValue:e.value,"onUpdate:modelValue":i[0]||(i[0]=g=>e.value=g),size:"24",onChange:i[1]||(i[1]=g=>d("selected",g))},null,8,["class","modelValue"]),s(n)?(t(),u("img",{key:0,class:a(c.$style.appIcon),src:s(n)},null,10,H)):b("",!0),U(" "+A(s(S)),1)]))}}),j="_appIcon_i9km9_1",q="_videoPreview_i9km9_6",G="_inline_i9km9_11",J={appIcon:j,videoPreview:q,inline:G},Q={$style:J},I=z(W,[["__cssModules",Q]]),K=B({__name:"screen-share-choice-dialog",props:{intiallyShared:{},initialDeskSoundShared:{type:Boolean}},emits:["select"],setup(h,{emit:v}){const d=h,y=v,{windowChoices:w,screenChoices:S,onOptionSelectionChange:p,onDeskSoundChange:m}=L(d,y),_=k(d.initialDeskSoundShared);return(n,o)=>(t(),u("div",{class:a(n.$style.shareOptions)},[r("div",{class:a(n.$style.soundShare)},[M(s(P),{modelValue:_.value,"onUpdate:modelValue":o[0]||(o[0]=e=>_.value=e),onChange:s(m),size:"24"},{default:E(()=>o[1]||(o[1]=[U(" Share sound ")])),_:1},8,["modelValue","onChange"])],2),o[2]||(o[2]=r("h2",null,"Screens:",-1)),(t(!0),u(O,null,V(s(S),e=>(t(),D(I,{class:a(n.$style.shareOption),opts:e,onSelected:l=>s(p)(e,l)},null,8,["class","opts","onSelected"]))),256)),o[3]||(o[3]=r("h2",null,"Windows:",-1)),(t(!0),u(O,null,V(s(w),e=>(t(),D(I,{class:a(n.$style.shareOption),opts:e,onSelected:l=>s(p)(e,l)},null,8,["class","opts","onSelected"]))),256))],2))}}),X="_shareOptions_1k3cy_1",Y="_soundShare_1k3cy_8",Z="_shareOption_1k3cy_1",x={shareOptions:X,soundShare:Y,shareOption:Z},ee={$style:x},ne=z(K,[["__cssModules",ee]]);export{ne as default};
