import"./rolldown-runtime-BM3Ffeng.js";import{at as e}from"./element-plus-vendor-BF9PNysW.js";import{A as t,Ct as n,D as r,E as i,N as a,O as o,P as s,Tt as c,Xt as l,et as u,ht as d,k as f}from"./vue-vendor-DMUmTARL.js";import{t as p}from"./_plugin-vue_export-helper-CWyGVBf-.js";import{t as m}from"./ZDialog-D5yc_FjB.js";import{t as h}from"./ShareListTable-BJS1IX09.js";var g={class:`zf-my-share-dialog`},_={class:`flex items-center gap-2 text-base font-semibold`},v={class:`zf-my-share-dialog__content`},y=p({__name:`MyShareDialog`,props:{visible:{type:Boolean,default:!1},storageList:{type:Array,default:()=>[]},activeStorageKey:{type:String,default:``}},emits:[`update:visible`],setup(p,{expose:y,emit:b}){let x=p,S=i(()=>x.storageList||[]),C=c(null),w=b,T=i({get:()=>x.visible,set:e=>w(`update:visible`,e)}),E=n({loading:!1,firstLoadCompleted:!1}),D=e=>{E.loading=!!e?.loading,E.firstLoadCompleted=!!e?.firstLoadCompleted},O=c(0),k=e=>{O.value=Number(e??0)};return y({refreshShares:()=>C.value?.fetchShares(),resetShares:()=>C.value?.resetFilters()}),(n,i)=>{let c=e,p=m;return u(),t(`div`,g,[s(p,{modelValue:T.value,"onUpdate:modelValue":i[0]||=e=>T.value=e,top:`5vh`,class:`zf-dialog-content-pb0 zf-dialog-content-flex-col`,"show-footer":!1,"destroy-on-close":``},{header:d(()=>[r(`div`,_,[i[1]||=r(`span`,null,`我的分享`,-1),E.firstLoadCompleted&&!E.loading?(u(),o(c,{key:0,size:`small`,type:`info`},{default:d(()=>[a(l(O.value),1)]),_:1})):f(``,!0)])]),default:d(()=>[r(`div`,v,[s(h,{ref_key:`shareTableRef`,ref:C,mode:`user`,"embedded-in-dialog":``,"storage-list":S.value,"active-storage-key":x.activeStorageKey,active:T.value,onStatusChange:D,onTotalChange:k},null,8,[`storage-list`,`active-storage-key`,`active`])])]),_:1},8,[`modelValue`])])}}},[[`__scopeId`,`data-v-ab9532f7`]]);export{y as default};