import{r as I,$ as k,aG as z,a8 as L,a9 as T,v as t,x as u,D as C,aH as $,z as r,A as a,E as s,y as M,aY as N,H as b,Q as P,B as A,L as U,O as E,M as O,N as V,F as D}from"./en-D2AdNj2c.js";import{u as R}from"./videoChat-DbEumN6L.js";const F=["src"],H=["src"],j=I({__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=z(),f=k(!1);return L(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(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,H)):b("",!0),P(" "+A(s(S)),1)]))}}),q="_appIcon_i9km9_1",G="_videoPreview_i9km9_6",Q="_inline_i9km9_11",W={appIcon:q,videoPreview:G,inline:Q},Y={$style:W},B=U(j,[["__cssModules",Y]]),x=I({__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}=R(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:E(()=>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(B,{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(B,{class:a(n.$style.shareOption),opts:e,onSelected:l=>s(p)(e,l)},null,8,["class","opts","onSelected"]))),256))],2))}}),J="_shareOptions_1k3cy_1",K="_soundShare_1k3cy_8",X="_shareOption_1k3cy_1",Z={shareOptions:J,soundShare:K,shareOption:X},ee={$style:Z},ne=U(x,[["__cssModules",ee]]);export{ne as default};
