System.register(["./index-legacy-DQdImDha.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-LjZ-8uGn.js?v=1773287522785","./FileIcon-legacy-CYrICTNK.js?v=1773287522785","./vue-core-legacy-Cn1vuJ3s.js?v=1773287522785","./naive-ui-legacy-BW82sq8q.js?v=1773287522785","./prismjs-legacy-BN0FEcG9.js?v=1773287522785","./soft-legacy-CzxZ2w7j.js?v=1773287522785","./copy-legacy-CoXPjkKf.js?v=1773287522785"],(function(e,a){"use strict";var l,t,i,n,s,o,r,u,f,m,c,p,v,d,y,w,_,C,g,h,b,j,$,x,T,z,F;return{setters:[e=>{l=e.C,t=e.w,i=e.x,n=e.h},e=>{s=e._},e=>{o=e.A,r=e.T,u=e.U,f=e.w},e=>{m=e.k,c=e.R,p=e.i,v=e.r,d=e.e,y=e.$,w=e.a8,_=e.a9,C=e._,g=e.a0,h=e.S,b=e.j,j=e.aa,$=e.X},e=>{x=e.a1,T=e.a3,z=e.a4,F=e.b},null,null,null],execute:function(){const a={class:"p-20px"},S={class:"w-240px"};e("default",m({name:"PasteSingleConfirm",__name:"PasteSingleConfirm",setup(e,{expose:m}){const{t:P}=c(),U=p("fileStore"),{currentPath:k,fileList:M,fileCopyCache:A,copiedFile:E,waitForPaste:I}=U,L=v(!1),N=d({type:"rename",name:"",size:0,modifyTime:""}),R=e=>{const a=o(M.value,A.value);a.length&&("overwrite"===e?N.name=a[0].nm:"rename"===e&&(N.name=X(a[0].nm)))},X=e=>e.replace(/\.(?=[^.]+$)/," - copy.");function Z(){L.value=!1}async function q(){await u(E.value.path,k.value+"/"+N.name),I.value=!1,f(U)}async function B(){if("rename"==N.type)return await r(k.value,N.name)?n({title:P("file.pasteConfirm.overwriteTitle"),content:P("file.pasteConfirm.overwriteMessage",[N.name]),onConfirm:async({hide:e})=>{await q(),e(),Z()}}):(await q(),Z()),!1;await q()}return m({open:function(){L.value=!0;const e=o(M.value,A.value);1==e.length&&(N.type="rename",N.name=X(e[0].nm),N.size=e[0].sz,N.modifyTime=t(e[0].mt))},close:Z}),(e,n)=>{const o=z,r=T,u=x,f=F,m=s,c=i;return y(),w(c,{show:h(L),"onUpdate:show":n[2]||(n[2]=e=>$(L)?L.value=e:null),width:440,title:e.$t("file.pasteConfirm.title"),footer:!0,onConfirm:B},{default:_((()=>[C("div",a,[g(m,null,{default:_((()=>[g(u,{label:e.$t("file.pasteConfirm.operationType")},{default:_((()=>[g(r,{value:h(N).type,"onUpdate:value":[n[0]||(n[0]=e=>h(N).type=e),R]},{default:_((()=>[g(o,{value:"overwrite"},{default:_((()=>[b(j(e.$t("file.pasteConfirm.overwriteFile")),1)])),_:1}),g(o,{value:"rename"},{default:_((()=>[b(j(e.$t("file.pasteConfirm.renameFile")),1)])),_:1})])),_:1},8,["value"])])),_:1},8,["label"]),g(u,{label:e.$t("file.pasteConfirm.fileName")},{default:_((()=>[C("div",S,[g(f,{value:h(N).name,"onUpdate:value":n[1]||(n[1]=e=>h(N).name=e),disabled:"overwrite"==h(N).type,placeholder:""},null,8,["value","disabled"])])])),_:1},8,["label"]),g(u,{label:e.$t("file.pasteConfirm.size")},{default:_((()=>[C("span",null,j(h(l)(h(N).size)),1)])),_:1},8,["label"]),g(u,{label:e.$t("file.pasteConfirm.lastModified"),"show-feedback":!1},{default:_((()=>[C("span",null,j(h(t)(h(N).modifyTime)),1)])),_:1},8,["label"])])),_:1})])])),_:1},8,["show","title"])}}}))}}}));
