import{_ as e}from"./index105.js?v=1761009159";import{aP as a,ap as t,P as s,cq as i,n as r,Q as l,p as o,cr as n,u as m,b2 as c,an as u,N as p,bN as d,_ as f}from"./utils-lib.js?v=1761009159";import{c as h,a as v,u as _}from"./column.js?v=1761009159";import{o as b,r as g,c as y,w as k,q as x,aF as j,a6 as w,v as R,x as C,e as B,B as q,z as L,y as N}from"./base-lib.js?v=1761009159";import{b as O,N as P,f as T}from"./useMethods.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./index106.js?v=1761009159";const{refs:{customLimit:W,isRefreshWarehouseList:E}}=a(),H=b({isRefresh:!0}),A=g([]),D=[{active:!0,label:"添加仓库",onClick:()=>{r({component:()=>l(()=>import("./index230.js?v=1761009159"),__vite__mapDeps([]),import.meta.url),title:"添加仓库",area:54,btn:"添加"})}},{type:"link",label:"需求反馈",class:"ml-[2rem]",onClick:()=>{P()}}],I=e=>{r({component:()=>l(()=>import("./index230.js?v=1761009159"),__vite__mapDeps([]),import.meta.url),title:"编辑仓库【".concat(e.name,"】"),area:54,btn:"编辑",compData:{row:e}})},J=async e=>{await o({title:"删除仓库【".concat(e.name,"】"),type:"calc",width:"35rem",content:"您真的要删除仓库【".concat(e.name,"】吗？")});const a={id:e.id};s({request:n({data:JSON.stringify(a)}),message:!0,loading:"正在删除...",success:()=>{E.value=!0}})},S=t([{label:"删除项目",value:"delete",event:async(e,a,t,s)=>{const{label:i,value:r}=s,l=async(e,a)=>{const{id:t}=e;if("delete"===r){const e={id:t};return await n({data:JSON.stringify(e)})}};await e({title:"批量".concat(i,"仓库"),content:"批量".concat(i,"已选的仓库，是否继续操作！"),column:[{label:"仓库名",prop:"name"},h()],onConfirm:async()=>(await a(l),E.value=!0,!1)})}}]),V=(e,a)=>{setTimeout(()=>{W.value.storage||((e,a)=>{setTimeout(()=>{e.value>900?a.value.limit=20:a.value.limit=10},0)})(e,a)},0)},z={class:"relative"},F={class:"flex items-center"},M=f(y({__name:"index",setup(t){const{refs:{isRefreshWarehouseList:r}}=a(),{mainHeight:l}=m(),{BtOperation:o}=c({options:D});k(()=>r.value,e=>{e&&(H.isRefresh=!0,g())});const{BtTable:n,BtPage:f,BtBatch:h,BtColumn:b,refresh:g,param:y}=u({request:e=>(async e=>{if(E.value=!1,!H.isRefresh)return{data:O({limit:e.limit,list:A.value,p:e.p})||[],total:A.value.length};H.isRefresh=!1;const a=await s({request:i(),data:Array});return A.value=a,{data:O({limit:e.limit,list:A.value,p:e.p})||[],total:A.value.length}})(e),columns:[v(),{label:"URL",prop:"url",minWidth:100},{label:"用户",prop:"namespace",minWidth:100,isCustom:!0},{label:"仓库名",prop:"name",minWidth:100,isCustom:!0},T({table:"images",prop:"remark",edit:async e=>{s({request:d({data:JSON.stringify({id:e.id,remark:e.remark})}),message:!0})},noPlace:!0,noCustom:!0,width:200}),_([{onClick:I,isHide:e=>"docker.io"==e.url&&"docker官方库"==e.name&&""==e.username,title:"编辑"},{onClick:J,isHide:e=>"docker.io"==e.url&&"docker官方库"==e.name&&""==e.username,title:"删除"}])],extension:[S]});return x(async()=>{V(l,y)}),j(()=>{p(["/btdocker/registry/registry_list"])}),w(()=>{H.isRefresh=!0,A.value=[]}),(a,t)=>{const s=e;return R(),C("div",z,[B(s,null,{"header-left":q(()=>[L("div",F,[B(N(o))])]),"header-right":q(()=>[B(N(b))]),content:q(()=>[B(N(n),{key:"wareTable","max-height":N(l)-220},null,8,["max-height"])]),"footer-left":q(()=>[B(N(h))]),"footer-right":q(()=>[B(N(f))]),popup:q(()=>t[0]||(t[0]=[])),_:1})])}}}),[["__scopeId","data-v-d919c40e"]]);export{M as default};
function __vite__mapDeps(indexes) {
  if (!__vite__mapDeps.viteFileDeps) {
    __vite__mapDeps.viteFileDeps = []
  }
  return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
}
