import{_ as D}from"./index.vue_vue_type_script_setup_true_lang-D8O2mMsP.js?v=1773287522785";import{bm as I,h3 as L}from"./index-BTglIPU2.js?v=1773287522785";import{k as R,R as $,r as u,e as y,$ as B,Z as C,a0 as n,a9 as r,_,S as t,N as E}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import{a1 as N,a6 as S,b as U}from"./naive-ui--dJnpVcV.js?v=1773287522785";import"./prismjs-BZPoR7_J.js?v=1773287522785";const V={class:"px-20px pt-24px pb-8px"},M={class:"w-240px"},O={class:"w-240px"},F=R({__name:"index",props:{row:{},list:{default:()=>[]}},setup(f,{expose:d}){const l=f,{t:p}=$(),g=I(),c=u(null),e=y({name:"",tag:""}),i=u([]),v={tag:{trigger:["blur","input"],validator:()=>e.tag.trim()===""?new Error(p("Docker.LocalImage.push_4")):e.tag.includes(":")?!0:new Error(p("Docker.LocalImage.push_5"))}},h=()=>{const o=l.list.filter(a=>a.name!=="Docker public repository");i.value=o.map(a=>({label:a.name,value:a.name})),e.name=o[0].name},b=async()=>{var o;await((o=c.value)==null?void 0:o.validate()),await L({...E(e),id:l.row.id}),g.setRefresh(!0)};return h(),d({onConfirm:b}),(o,a)=>{const k=S,m=N,w=U,x=D;return B(),C("div",V,[n(x,{ref_key:"formRef",ref:c,model:t(e),rules:v},{default:r(()=>[n(m,{label:o.$t("Docker.LocalImage.push_1")},{default:r(()=>[_("div",M,[n(k,{value:t(e).name,"onUpdate:value":a[0]||(a[0]=s=>t(e).name=s),options:t(i)},null,8,["value","options"])])]),_:1},8,["label"]),n(m,{label:o.$t("Docker.LocalImage.push_2"),path:"tag"},{default:r(()=>[_("div",O,[n(w,{value:t(e).tag,"onUpdate:value":a[1]||(a[1]=s=>t(e).tag=s),placeholder:o.$t("Docker.LocalImage.push_3")},null,8,["value","placeholder"])])]),_:1},8,["label"])]),_:1},8,["model"])])}}});export{F as default};
