import{X as g}from"./MkDrive-AOFUG08I.js";import{b as i,a5 as y}from"./app-QjDgb7aF.js";import{n as b}from"./number-BJeYzK3l.js";import{b as C,j as m,g as x,i as f,k as D,J as $,D as p,u as o,p as w,H as B,a as c}from"./vue-Cm77DuTi.js";import"./bytes-C39hD0JB.js";import"./charts-3gEHPHRq.js";import"./media-DuCIZ-3n.js";const F={key:0,style:{"margin-left":"8px",opacity:"0.5"}},E=C({__name:"MkDriveSelectDialog",props:{type:{default:"file"},multiple:{type:Boolean}},emits:["done","closed"],setup(t,{emit:v}){const s=v,a=c(),l=c([]);function r(){s("done",l.value),a.value?.close()}function u(){s("done"),a.value?.close()}function k(d){l.value=d}return(d,e)=>(m(),x(y,{ref_key:"dialog",ref:a,width:800,height:500,"with-ok-button":!0,"ok-button-disabled":t.type==="file"&&l.value.length===0,onClick:e[1]||(e[1]=n=>u()),onClose:e[2]||(e[2]=n=>u()),onOk:e[3]||(e[3]=n=>r()),onClosed:e[4]||(e[4]=n=>s("closed"))},{header:f(()=>[$(p(t.multiple?t.type==="file"?o(i).ts.selectFiles:o(i).ts.selectFolders:t.type==="file"?o(i).ts.selectFile:o(i).ts.selectFolder)+" ",1),l.value.length>0?(m(),w("span",F,"("+p(o(b)(l.value.length))+")",1)):B("",!0)]),default:f(()=>[D(g,{multiple:t.multiple,select:t.type,onChangeSelection:k,onSelected:e[0]||(e[0]=n=>r())},null,8,["multiple","select"])]),_:1},8,["ok-button-disabled"]))}});export{E as default};
//# sourceMappingURL=MkDriveSelectDialog-Bdh_lbHJ.js.map
