import{_ as e}from"./index.js?v=1763625242172";import{f as a,a as t,h as s}from"./public.js?v=1763625242172";import{a9 as i}from"./page_layout.js?v=1763625242172";import{h as l,i as o}from"./index39.js?v=1763625242172";import{_ as r}from"./ShareDetail.vue_vue_type_script_setup_true_lang.js?v=1763625242172";import{k as n,P as p,i as u,r as m,av as f,R as c,S as d,X as _,a3 as h,U as v,V as j,aj as y,F as g}from"./vue.js?v=1763625242172";import{d$ as x}from"./naive.js?v=1763625242172";import"./common.js?v=1763625242172";import"./__commonjsHelpers__.js?v=1763625242172";import"./soft2.js?v=1763625242172";import"./soft.js?v=1763625242172";import"./site.js?v=1763625242172";import"./file2.js?v=1763625242172";import"./index.vue_vue_type_script_setup_true_lang7.js?v=1763625242172";import"./index.vue_vue_type_script_setup_true_lang.js?v=1763625242172";const L={class:"p-20px"},k={class:"mt-10px flex justify-end items-center"},w=n({__name:"ShareList",setup(n,{expose:w}){const{t:M}=p(),D=u("fileStore"),{shareList:S,shareListPage:b,shareListTotal:P}=D,C=m(!1),R=m(!1),U=f("shareDetailRef"),B=async()=>{try{R.value=!0,await o(D)}finally{R.value=!1}};function T(e){b.value=e,B()}w({open(){C.value=!0,B()},close(){C.value=!1}});const A=m([{key:"ps",title:M("file.shareListModal.shareName")},{key:"filename",title:M("file.shareListModal.shareAddress")},{key:"expire",title:M("file.shareListModal.expirationDate"),render:e=>i(e.expire)},a({width:120,options:e=>[{label:M("Public.Btn.Details"),onClick:()=>{!async function(e){var a;null==(a=U.value)||a.open(e)}(e)}},{label:M("Public.Btn.Delete"),onClick:()=>{var a;a=e,t({title:M("file.shareListModal.cancelShareTitle"),content:M("file.shareListModal.cancelShareMessage",{filename:a.filename}),onConfirm:async()=>{await l(D,a.id),B()}})}}]})]);return(a,t)=>{const i=s,l=x,o=e;return c(),d(g,null,[_(o,{show:j(C),"onUpdate:show":t[1]||(t[1]=e=>y(C)?C.value=e:null),title:j(M)("file.shareListModal.title"),width:850},{default:h((()=>[v("div",L,[_(i,{loading:j(R),data:j(S),columns:j(A)},null,8,["loading","data","columns"]),v("div",k,[_(l,{"item-count":j(P),page:j(b),"onUpdate:page":t[0]||(t[0]=e=>y(b)?b.value=e:null),"on-update:page":T},null,8,["item-count","page"])])])])),_:1},8,["show","title"]),_(r,{ref_key:"shareDetailRef",ref:U},null,512)],64)}}});export{w as default};
