import{z as B,a1 as k,aI as b,aa as z,ab as L,B as t,C as u,J as C,aJ as $,F as r,G as a,K as s,D as M,aY as N,N as R,Z as P,H as T,Q as U,V as A,R as O,S as V,L as D}from"./en-BDDSqdif.js";import{u as E}from"./videoChat-BrQraaBr.js";const F=["src"],J=["src"],j=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=b(),f=k(!1);return z(async()=>{l.value.srcObject=await m,f.value=!0}),L(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(N),{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,J)):R("",!0),P(" "+T(s(S)),1)]))}}),q="_appIcon_i9km9_1",G="_videoPreview_i9km9_6",H="_inline_i9km9_11",K={appIcon:q,videoPreview:G,inline:H},Q={$style:K},I=U(j,[["__cssModules",Q]]),W=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}=E(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(N),{modelValue:_.value,"onUpdate:modelValue":o[0]||(o[0]=e=>_.value=e),onChange:s(m),size:"24"},{default:A(()=>o[1]||(o[1]=[P(" 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))}}),Y="_shareOptions_1k3cy_1",Z="_soundShare_1k3cy_8",X="_shareOption_1k3cy_1",x={shareOptions:Y,soundShare:Z,shareOption:X},ee={$style:x},ne=U(W,[["__cssModules",ee]]);export{ne as default};
