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