import{a0 as e}from"./wsl.js?v=20260328163632";import{l as a,t as r,x as s}from"./utils-lib.js?v=20260328163632";import{g as l}from"./index196.js?v=20260328163632";import{k as t,r as i,c as p,V as u,_ as n,Y as o}from"./base-lib.js?v=20260328163632";import"./naive-ui.js?v=20260328163632";import"./__commonjsHelpers__.js?v=20260328163632";import"./env-lib.js?v=20260328163632";import"./index91.js?v=20260328163632";import"./index92.js?v=20260328163632";import"./index50.js?v=20260328163632";import"./index97.js?v=20260328163632";const m=t({__name:"index",setup(t,{expose:m}){const c={labelStyle:"min-width: 100px"},d=i({formAttrs:{labelWidth:"auto"},formItems:[]}),h=i({label:a("仓库名称"),attrs:c,ruleKey:"name",rules:[{required:!0,message:a("请输入仓库名称"),trigger:["blur","change"]}],children:[{key:"name",type:"input",attrs:{class:"!w-[320px]",placeholder:a("请输入仓库名称")}}]}),y=i({label:a("仓库显示名称"),attrs:c,ruleKey:"reg_name",rules:[{required:!0,message:a("请输入仓库显示名称"),trigger:["blur","change"]}],children:[{key:"reg_name",type:"input",attrs:{class:"!w-[320px]",placeholder:a("请输入仓库显示名称")}}]}),x=i({label:a("仓库地址"),attrs:c,ruleKey:"url",rules:[{required:!0,message:a("请输入仓库地址"),trigger:["blur","change"]}],children:[{key:"url",type:"input",attrs:{class:"!w-[320px]",placeholder:a("请输入仓库地址")}}]}),g=i({label:a("命名空间"),attrs:c,children:[{key:"namespace",type:"input",attrs:{class:"!w-[320px]",placeholder:a("请输入命名空间")}}]}),b=i({label:a("用户名"),attrs:c,children:[{key:"username",type:"input",attrs:{class:"!w-[320px]",placeholder:a("请输入用户名")}}]}),v=i({label:a("密码"),attrs:c,children:[{key:"password",type:"input",attrs:{class:"!w-[320px]",placeholder:a("请输入密码")}}]}),j=i({label:a("备注"),attrs:c,children:[{key:"remark",type:"input",attrs:{class:"!w-[320px]",placeholder:a("请输入备注")}}]}),w=p((()=>(d.value.formItems=[h.value,y.value,x.value,g.value,b.value,v.value,j.value],d.value))),[f,k,_]=r(w);return m({onConfirm:async()=>{var r;try{await(null==(r=_.value)?void 0:r.validate());return(await s({loading:a("正在添加镜像仓库，请稍后..."),request:e(k.value),message:!0,success:e=>{l()}})).status}catch(t){}}}),(e,a)=>(u(),n(o(f),{class:"p-20px"}))}});export{m as default};
