import{q as B,r as k,s as z,ad as L,ae as T,v as t,x as u,D as C,aI as O,z as r,A as a,E as s,y as M,aZ as N,H as b,Q as P,B as A,L as U,O as E,M as $,N as V,F as D}from"./en-1nw-8IF_.js";import{u as R}from"./videoChat-D39G0J0u.js";const q=["src"],F=["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=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),[[O,!!f.value]]),C(r("img",{src:s(p)},null,8,q),[[O,!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,F)):b("",!0),P(" "+A(s(S)),1)]))}}),H="_appIcon_i9km9_1",Q="_videoPreview_i9km9_6",W="_inline_i9km9_11",Z={appIcon:H,videoPreview:Q,inline:W},x={$style:Z},I=U(j,[["__cssModules",x]]),G=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}=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($,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($,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))}}),J="_shareOptions_1k3cy_1",K="_soundShare_1k3cy_8",X="_shareOption_1k3cy_1",Y={shareOptions:J,soundShare:K,shareOption:X},ee={$style:Y},ne=U(G,[["__cssModules",ee]]);export{ne as default};
