"use strict";(self.webpackChunknextcloud_news=self.webpackChunknextcloud_news||[]).push([["node_modules_nextcloud_dialogs_dist_legacy_mjs"],{9942:(e,t,l)=>{l.r(t),l.d(t,{confirm:()=>y,filepicker:()=>r});var a=l(41421),o=l(57089),i=(l(7736),l(85471)),s=l(62543);const n="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGlkPSJtZGktZm9sZGVyLW11bHRpcGxlIiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0yMiw0SDE0TDEyLDJINkEyLDIgMCAwLDAgNCw0VjE2QTIsMiAwIDAsMCA2LDE4SDIyQTIsMiAwIDAsMCAyNCwxNlY2QTIsMiAwIDAsMCAyMiw0TTIsNkgwVjExSDBWMjBBMiwyIDAgMCwwIDIsMjJIMjBWMjBIMlY2WiIgLz48L3N2Zz4=",u="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGlkPSJtZGktZm9sZGVyLW1vdmUiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTE0LDE4VjE1SDEwVjExSDE0VjhMMTksMTNNMjAsNkgxMkwxMCw0SDRDMi44OSw0IDIsNC44OSAyLDZWMThBMiwyIDAgMCwwIDQsMjBIMjBBMiwyIDAgMCwwIDIyLDE4VjhDMjIsNi44OSAyMS4xLDYgMjAsNloiIC8+PC9zdmc+",c=(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 r(e,t,l=!1,i,s,r=o.a.Choose,y,d){const m=(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;r===o.a.Custom?(M=[],(d.buttons||[]).forEach((e=>{M.push({callback:m(t,e.type),label:e.text,type:e.defaultButton?"primary":"secondary"})}))):M=(e,i)=>{var s,c,y;const d=[],M=(null==(c=null==(s=null==e?void 0:e[0])?void 0:s.attributes)?void 0:c.displayName)||(null==(y=null==e?void 0:e[0])?void 0:y.basename),p=M||(0,a.basename)(i);return r===o.a.Choose&&d.push({callback:m(t,o.a.Choose),label:M&&!l?(0,o.t)("Choose {file}",{file:M}):(0,o.t)("Choose"),type:"primary"}),(r===o.a.CopyMove||r===o.a.Copy)&&d.push({callback:m(t,o.a.Copy),label:p?(0,o.t)("Copy to {target}",{target:p}):(0,o.t)("Copy"),type:"primary",icon:n}),(r===o.a.Move||r===o.a.CopyMove)&&d.push({callback:m(t,o.a.Move),label:p?(0,o.t)("Move to {target}",{target:p}):(0,o.t)("Move"),type:r===o.a.Move?"primary":"secondary",icon:u}),d};const p={};"function"==typeof(null==d?void 0:d.filter)&&(p.filterFn=e=>d.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||[];c(o.c,{...p,name:e,buttons:M,multiselect:l,path:y,mimetypeFilter:v,allowPickDirectory:!0===(null==d?void 0:d.allowDirectoryChooser)||v.includes("httpd/unix-directory")})}async function y(e,t,l,a){c(s.D,{name:t,message:e,buttons:[{label:"No",callback:()=>l(!1)},{label:"Yes",type:"primary",callback:()=>l(!0)}],size:"small"},(()=>l(!1)))}}}]);
//# sourceMappingURL=nextcloud-news-node_modules_nextcloud_dialogs_dist_legacy_mjs.js.map?v=053a1f53c2e67eb760b1