import{aP as e,P as a,iL as s,iM as r,K as l,_ as t}from"./utils-lib.js?v=1761009159";import{c as o,aA as m,g as i,v as u,x as n,e as c,y as p}from"./base-lib.js?v=1761009159";import{b as d,d as g}from"./form-item.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./index106.js?v=1761009159";const{refs:{isRefreshWarehouseList:v}}=e(),w={class:"flex flex-col p-[1.6rem] lib-box"},b=t(o({__name:"index",props:{compData:{default:()=>({})}},setup(e,{expose:t}){const o=e,b=m("popupClose",()=>{}),{BtForm:f,submit:y}=l({data:()=>{var e,a,s,r,l,t,m;return{registry:(null==(e=o.compData.row)?void 0:e.url)||"",name:(null==(a=o.compData.row)?void 0:a.name)||"",username:(null==(s=o.compData.row)?void 0:s.username)||"",password:(null==(r=o.compData.row)?void 0:r.password)||"",namespace:(null==(l=o.compData.row)?void 0:l.namespace)||"",remark:(null==(t=o.compData.row)?void 0:t.remark)||"",id:(null==(m=o.compData.row)?void 0:m.id)||""}},options:()=>i(()=>[d("仓库地址","registry",{attrs:{class:"!w-[35rem]",placeholder:"例：ccr.ccs.tencentyun.com"},rules:[{required:!0,message:"请输入仓库地址",trigger:"blur"}]}),d("仓库名","name",{attrs:{class:"!w-[35rem]",placeholder:"例：testtest"},rules:[{required:!0,message:"请输入仓库名",trigger:"blur"}]}),g([d("用户","username",{attrs:{class:"!w-[15rem]",placeholder:"请输入仓库用户"},rules:[{required:!0,message:"请输入用户",trigger:"blur"}]}),d("密码","password",{attrs:{class:"!w-[13rem]",placeholder:"请输入仓库密码"},labelAttrs:{class:"inline-label"},rules:[{required:!0,message:"请输入密码",trigger:"blur"}]})]),d("命名空间","namespace",{attrs:{class:"!w-[35rem]",placeholder:"例：testname"},rules:[{required:!0,message:"请输入命名空间",trigger:"blur"}]}),d("备注","remark",{attrs:{class:"!w-[35rem]",placeholder:"备注"}})]),submit:async(e,l,t)=>{await l(),(async(e,l)=>{a({request:e.value.id?r({data:JSON.stringify(e.value)}):s({data:JSON.stringify({registry:e.value.registry,name:e.value.name,username:e.value.username,password:e.value.password,namespace:e.value.namespace,remark:e.value.remark})}),message:!0,loading:"正在设置",success:({status:e})=>{e&&(v.value=!0,l())}})})(e,b)}});return t({onConfirm:y}),(e,a)=>(u(),n("div",w,[c(p(f))]))}}),[["__scopeId","data-v-90b51322"]]);export{b as default};
