import{w as S,h as b,x as C}from"./index-BTglIPU2.js?v=1773287522785";import{_ as M}from"./index.vue_vue_type_script_setup_true_lang-BeO8Hyma.js?v=1773287522785";import{u as B}from"./useTableColumns-DDeyYvje.js?v=1773287522785";import{Y as R,Z as P}from"./FileIcon-eIHDRaxH.js?v=1773287522785";import{_ as T}from"./ShareDetail.vue_vue_type_script_setup_true_lang-Vpbw-Uhg.js?v=1773287522785";import{k as N,R as $,i as j,r as c,al as A,$ as F,Z as U,a0 as i,a9 as V,_ as u,S as s,X as d,F as Z}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import{aB as E}from"./naive-ui--dJnpVcV.js?v=1773287522785";import"./prismjs-BZPoR7_J.js?v=1773287522785";import"./data-BVsViUMm.js?v=1773287522785";import"./index-S15tYq5l.js?v=1773287522785";import"./copy-D-wIKr0q.js?v=1773287522785";import"./index-DIKmrNCq.js?v=1773287522785";import"./index.vue_vue_type_script_setup_true_lang-DeTfbeeM.js?v=1773287522785";import"./index-Cg6fMjw6.js?v=1773287522785";import"./soft-Cjyfamvm.js?v=1773287522785";import"./index.vue_vue_type_script_setup_true_lang-D8O2mMsP.js?v=1773287522785";const I={class:"p-20px"},X={class:"mt-10px flex justify-end items-center"},le=N({__name:"ShareList",setup(Y,{expose:_}){const{t}=$(),l=j("fileStore"),{shareList:h,shareListPage:n,shareListTotal:g}=l,o=c(!1),r=c(!1),f=A("shareDetailRef"),m=async()=>{try{r.value=!0,await P(l)}finally{r.value=!1}};function L(e){n.value=e,m()}_({open(){o.value=!0,m()},close(){o.value=!1}});const x=c([{key:"ps",title:t("file.shareListModal.shareName")},{key:"filename",title:t("file.shareListModal.shareAddress")},{key:"expire",title:t("file.shareListModal.expirationDate"),render:e=>S(e.expire)},B({width:120,options:e=>[{label:t("Public.Btn.Details"),onClick:()=>{w(e)}},{label:t("Public.Btn.Delete"),onClick:()=>{v(e)}}]})]);function v(e){b({title:t("file.shareListModal.cancelShareTitle"),content:t("file.shareListModal.cancelShareMessage",{filename:e.filename}),onConfirm:async()=>{await R(l,e.id),m()}})}async function w(e){var a;(a=f.value)==null||a.open(e)}return(e,a)=>{const y=M,k=E,D=C;return F(),U(Z,null,[i(D,{show:s(o),"onUpdate:show":a[1]||(a[1]=p=>d(o)?o.value=p:null),title:s(t)("file.shareListModal.title"),width:850},{default:V(()=>[u("div",I,[i(y,{loading:s(r),data:s(h),columns:s(x)},null,8,["loading","data","columns"]),u("div",X,[i(k,{"item-count":s(g),page:s(n),"onUpdate:page":a[0]||(a[0]=p=>d(n)?n.value=p:null),"on-update:page":L},null,8,["item-count","page"])])])]),_:1},8,["show","title"]),i(T,{ref_key:"shareDetailRef",ref:f},null,512)],64)}}});export{le as default};
