const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.OC.filePath('photos', '', 'js/index-BC-7VPxC-DTQKybTB.chunk.mjs'),window.OC.filePath('photos', '', 'js/preload-helper-Dh9HmuEY.chunk.mjs'),window.OC.filePath('photos', '', 'js/vue.runtime.esm-Ct3_M7aQ.chunk.mjs')])))=>i.map(i=>d[i]);
import{_ as m}from"./preload-helper-Dh9HmuEY.chunk.mjs";import{X as p}from"./vue.runtime.esm-Ct3_M7aQ.chunk.mjs";import{s as h}from"./dialog-DMSB8C_5.chunk.mjs";import{am as o,an as d}from"./index-C9rtWdw7.chunk.mjs";const b='<svg xmlns="http://www.w3.org/2000/svg" id="mdi-folder-move" viewBox="0 0 24 24"><path d="M14,18V15H10V11H14V8L19,13M20,6H12L10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6Z" /></svg>',w='<svg xmlns="http://www.w3.org/2000/svg" id="mdi-folder-multiple" viewBox="0 0 24 24"><path d="M22,4H14L12,2H6A2,2 0 0,0 4,4V16A2,2 0 0,0 6,18H22A2,2 0 0,0 24,16V6A2,2 0 0,0 22,4M2,6H0V11H0V20A2,2 0 0,0 2,22H20V20H2V6Z" /></svg>';class y extends Error{}class g{title;multiSelect;mimeTypeFilter;directoriesAllowed;buttons;path;filter;container;disabledNavigation;constructor(t,e,l,i,s,r,a,c,u=!1){this.title=t,this.multiSelect=e,this.mimeTypeFilter=l,this.directoriesAllowed=i,this.path=r,this.filter=a,this.buttons=s,this.container=c,this.disabledNavigation=u}async pickNodes(){const{FilePickerVue:t}=await m(async()=>{const{FilePickerVue:e}=await import("./index-BC-7VPxC-DTQKybTB.chunk.mjs");return{FilePickerVue:e}},__vite__mapDeps([0,1,2]),import.meta.url);return new Promise((e,l)=>{h(t,{allowPickDirectory:this.directoriesAllowed,buttons:this.buttons,container:this.container,name:this.title,path:this.path,mimetypeFilter:this.mimeTypeFilter,multiselect:this.multiSelect,filterFn:this.filter,disabledNavigation:this.disabledNavigation},(...i)=>{const[s]=i;!Array.isArray(s)||s.length===0?l(new y("FilePicker: No nodes selected")):e(s)})})}async pick(){const t=await this.pickNodes();return this.multiSelect?t.map(e=>e.path):t[0]?.path??"/"}}class f{title;multiSelect=!1;mimeTypeFilter=[];directoriesAllowed=!1;path;filter;buttons=[];container;disabledNavigation=!1;constructor(t){this.title=t}setContainer(t){return this.container=t,this}setMultiSelect(t){return this.multiSelect=t,this}addMimeTypeFilter(t){return this.mimeTypeFilter.push(t),this}setMimeTypeFilter(t){return this.mimeTypeFilter=t,this}addButton(t){return typeof this.buttons=="function"&&(console.warn("FilePicker buttons were set to factory, now overwritten with button object."),this.buttons=[]),this.buttons.push(t),this}setButtonFactory(t){return this.buttons=t,this}setType(t){return this.buttons=(e,l)=>{const i=[],s=e?.[0]?.attributes?.displayName||e?.[0]?.basename,r=s||p.basename(l);if(t===1){let a=o("Choose");e.length===1?a=o("Choose {file}",{file:s}):this.multiSelect&&(a=d("Choose %n file","Choose %n files",e.length)),i.push({callback:()=>{},type:"primary",label:a})}return(t===4||t===3)&&i.push({callback:()=>{},label:r?o("Copy to {target}",{target:r}):o("Copy"),type:"primary",icon:w}),(t===2||t===4)&&i.push({callback:()=>{},label:r?o("Move to {target}",{target:r}):o("Move"),type:t===2?"primary":"secondary",icon:b}),i},this}allowDirectories(t=!0){return this.directoriesAllowed=t,this}startAt(t){return this.path=t,this}setFilter(t){return this.filter=t,this}disableNavigation(){return this.disabledNavigation=!0,this}build(){return new g(this.title,this.multiSelect,this.mimeTypeFilter,this.directoriesAllowed,this.buttons,this.path,this.filter,this.container,this.disabledNavigation)}}function k(n){return new f(n)}const H=h;export{k as g,H as s};
//# sourceMappingURL=index-BDo9Roh6.chunk.mjs.map
