import{_ as a}from"./index.vue_vue_type_script_setup_true_lang.js?v=1763625242172";import{bU as e,go as l}from"./page_layout.js?v=1763625242172";import"./public.js?v=1763625242172";import{k as s,P as o,r as t,e as r,R as p,S as u,X as n,a3 as m,U as i,V as c,N as d}from"./vue.js?v=1763625242172";import{dV as _,dP as v,au as g}from"./naive.js?v=1763625242172";import"./common.js?v=1763625242172";import"./__commonjsHelpers__.js?v=1763625242172";const f={class:"px-20px pt-24px pb-8px"},b={class:"w-240px"},x={class:"w-240px"},h=s({__name:"index",props:{row:{},list:{default:()=>[]}},setup(s,{expose:h}){const j=s,{t:k}=o(),w=e(),D=t(null),y=r({name:"",tag:""}),I=t([]),L={tag:{trigger:["blur","input"],validator:()=>""===y.tag.trim()?new Error(k("Docker.LocalImage.push_4")):!!y.tag.includes(":")||new Error(k("Docker.LocalImage.push_5"))}};return(()=>{const a=j.list.filter((a=>"Docker public repository"!==a.name));I.value=a.map((a=>({label:a.name,value:a.name}))),y.name=a[0].name})(),h({onConfirm:async()=>{var a;await(null==(a=D.value)?void 0:a.validate()),await l({...d(y),id:j.row.id}),w.setRefresh(!0)}}),(e,l)=>{const s=_,o=v,t=g,r=a;return p(),u("div",f,[n(r,{ref_key:"formRef",ref:D,model:c(y),rules:L},{default:m((()=>[n(o,{label:e.$t("Docker.LocalImage.push_1")},{default:m((()=>[i("div",b,[n(s,{value:c(y).name,"onUpdate:value":l[0]||(l[0]=a=>c(y).name=a),options:c(I)},null,8,["value","options"])])])),_:1},8,["label"]),n(o,{label:e.$t("Docker.LocalImage.push_2"),path:"tag"},{default:m((()=>[i("div",x,[n(t,{value:c(y).tag,"onUpdate:value":l[1]||(l[1]=a=>c(y).tag=a),placeholder:e.$t("Docker.LocalImage.push_3")},null,8,["value","placeholder"])])])),_:1},8,["label"])])),_:1},8,["model"])])}}});export{h as default};
