"use strict";(self.webpackChunkbookmarks=self.webpackChunkbookmarks||[]).push([["node_modules_nextcloud_dialogs_dist_legacy_mjs"],{2608:(e,t,l)=>{l.r(t),l.d(t,{confirm:()=>y,filepicker:()=>c});var a=l(26470),o=l(50894),i=(l(48588),l(20144)),s=l(89916);const n="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGlkPSJtZGktZm9sZGVyLW11bHRpcGxlIiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0yMiw0SDE0TDEyLDJINkEyLDIgMCAwLDAgNCw0VjE2QTIsMiAwIDAsMCA2LDE4SDIyQTIsMiAwIDAsMCAyNCwxNlY2QTIsMiAwIDAsMCAyMiw0TTIsNkgwVjExSDBWMjBBMiwyIDAgMCwwIDIsMjJIMjBWMjBIMlY2WiIgLz48L3N2Zz4=",r="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGlkPSJtZGktZm9sZGVyLW1vdmUiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTE0LDE4VjE1SDEwVjExSDE0VjhMMTksMTNNMjAsNkgxMkwxMCw0SDRDMi44OSw0IDIsNC44OSAyLDZWMThBMiwyIDAgMCwwIDQsMjBIMjBBMiwyIDAgMCwwIDIyLDE4VjhDMjIsNi44OSAyMS4xLDYgMjAsNloiIC8+PC9zdmc+",u=(e,t,l=(()=>{}))=>{const a=document.createElement("div");(document.querySelector(null==t?void 0:t.container)||document.body).appendChild(a);const o=new i.default({el:a,name:"VueDialogHelper",render:a=>a(e,{props:t,on:{close:()=>{l(),o.$destroy()}}})})};async function c(e,t,l=!1,i,s,c=o.a.Choose,y,m){const d=(e,t)=>{const a=e=>{const t=(null==e?void 0:e.root)||"";let l=(null==e?void 0:e.path)||"";return l.startsWith(t)&&(l=l.slice(t.length)||"/"),l};return l?l=>e(l.map(a),t):l=>e(a(l[0]),t)};let M;c===o.a.Custom?(M=[],(m.buttons||[]).forEach((e=>{M.push({callback:d(t,e.type),label:e.text,type:e.defaultButton?"primary":"secondary"})}))):M=(e,i)=>{var s,u,y;const m=[],M=(null==(u=null==(s=null==e?void 0:e[0])?void 0:s.attributes)?void 0:u.displayName)||(null==(y=null==e?void 0:e[0])?void 0:y.basename),p=M||(0,a.basename)(i);return c===o.a.Choose&&m.push({callback:d(t,o.a.Choose),label:M&&!l?(0,o.t)("Choose {file}",{file:M}):(0,o.t)("Choose"),type:"primary"}),(c===o.a.CopyMove||c===o.a.Copy)&&m.push({callback:d(t,o.a.Copy),label:p?(0,o.t)("Copy to {target}",{target:p}):(0,o.t)("Copy"),type:"primary",icon:n}),(c===o.a.Move||c===o.a.CopyMove)&&m.push({callback:d(t,o.a.Move),label:p?(0,o.t)("Move to {target}",{target:p}):(0,o.t)("Move"),type:c===o.a.Move?"primary":"secondary",icon:r}),m};const p={};"function"==typeof(null==m?void 0:m.filter)&&(p.filterFn=e=>m.filter((e=>{var t,l,a,o,i,s;return{id:e.fileid||null,path:e.path,mimetype:e.mime||null,mtime:(null==(t=e.mtime)?void 0:t.getTime())||null,permissions:e.permissions,name:(null==(l=e.attributes)?void 0:l.displayname)||e.basename,etag:(null==(a=e.attributes)?void 0:a.etag)||null,hasPreview:(null==(o=e.attributes)?void 0:o.hasPreview)||null,mountType:(null==(i=e.attributes)?void 0:i.mountType)||null,quotaAvailableBytes:(null==(s=e.attributes)?void 0:s.quotaAvailableBytes)||null,icon:null,sharePermissions:null}})(e)));const v="string"==typeof i?[i]:i||[];u(o.c,{...p,name:e,buttons:M,multiselect:l,path:y,mimetypeFilter:v,allowPickDirectory:!0===(null==m?void 0:m.allowDirectoryChooser)||v.includes("httpd/unix-directory")})}async function y(e,t,l,a){u(s.D,{name:t,message:e,buttons:[{label:"No",callback:()=>l(!1)},{label:"Yes",type:"primary",callback:()=>l(!0)}],size:"small"},(()=>l(!1)))}}}]);
//# sourceMappingURL=bookmarks-node_modules_nextcloud_dialogs_dist_legacy_mjs.js.map?v=7e09f9a4e803cb58e1a7