import{B as e,C as t,F as n,N as r,S as i,Y as a,_ as o,g as s,h as c,p as l,t as u,x as d,y as f}from"./_plugin-vue_export-helper-BNDVmFr7.js";import{n as p,t as m}from"./BaseBottomSheet-Bsol3Sat.js";var h={class:`device-picker__list`},g=[`checked`,`onChange`],_={class:`device-picker__name`},v={class:`device-picker__orientation`},y=u(t({__name:`DevicePicker`,props:{modelValue:{type:Boolean},devices:{},selected:{},uploading:{type:Boolean}},emits:[`update:modelValue`,`update:selected`,`confirm`],setup(t,{emit:u}){let y=t,b=u;function x(e){y.selected.includes(e)?b(`update:selected`,y.selected.filter(t=>t!==e)):b(`update:selected`,[...y.selected,e])}let S=c(()=>{let e=y.selected.length;return e===0?`Add to frame`:`Add to ${e} frame${e>1?`s`:``}`});return(c,u)=>(r(),o(m,{"model-value":t.modelValue,label:`Choose frames`,"onUpdate:modelValue":u[1]||=e=>c.$emit(`update:modelValue`,e)},{default:e(()=>[u[2]||=s(`h2`,{class:`device-picker__title`},`Add to frames`,-1),u[3]||=s(`p`,{class:`device-picker__sub`},`Choose which frames will show this photo.`,-1),s(`div`,h,[(r(!0),f(l,null,n(t.devices,e=>(r(),f(`label`,{key:e.id,class:`device-picker__row`},[s(`input`,{type:`checkbox`,class:`device-picker__check`,checked:t.selected.includes(e.id),onChange:t=>x(e.id)},null,40,g),s(`span`,_,a(e.name),1),s(`span`,v,a(e.orientation),1)]))),128))]),i(p,{variant:`primary`,class:`device-picker__confirm`,disabled:t.selected.length===0||t.uploading,onClick:u[0]||=e=>c.$emit(`confirm`)},{default:e(()=>[d(a(t.uploading?`Uploading…`:S.value),1)]),_:1},8,[`disabled`])]),_:1},8,[`model-value`]))}}),[[`__scopeId`,`data-v-a6466fa5`]]);export{y as t};