import{_ as w}from"./index.vue_vue_type_script_setup_true_lang-D8O2mMsP.js?v=1773287522785";import{_ as y}from"./index-CZps0rIN.js?v=1773287522785";import{_ as D}from"./index.vue_vue_type_script_setup_true_lang-CgKUoL60.js?v=1773287522785";import{k as I,R as x,r as L,e as $,$ as C,Z as E,a0 as o,a9 as s,_ as p,S as e,l as u,v as _}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import{bm as R,h2 as U}from"./index-BTglIPU2.js?v=1773287522785";import B from"./index-Cy3Gp9Hk.js?v=1773287522785";import{a1 as S,a6 as N}from"./naive-ui--dJnpVcV.js?v=1773287522785";import"./index-K4YGya6V.js?v=1773287522785";import"./prismjs-BZPoR7_J.js?v=1773287522785";import"./theme-monokai-Bqt0uTuQ.js?v=1773287522785";import"./ace-CNnfDSio.js?v=1773287522785";import"./useLoading-CZ2gSAW7.js?v=1773287522785";import"./file-B5PwfK2h.js?v=1773287522785";const V={class:"p-20px"},j={class:"w-100px mr-10px"},A={class:"w-240px"},M={class:"w-350px"},O={class:"w-350px"},ta=I({__name:"index",setup(Z,{expose:d}){const{t:n}=x(),c=R(),m=L(null),a=$({type:"path",path:"",data:"",tag:""}),f=[{label:n("Docker.LocalImage.build_1"),value:"path"},{label:n("Docker.LocalImage.build_5"),value:"data"}],h={path:{trigger:["blur","input"],validator:()=>a.type==="path"&&a.path.trim()===""?new Error(n("Docker.LocalImage.build_6")):!0},data:{trigger:["blur","input"],validator:()=>a.type==="data"&&a.data.trim()===""?new Error(n("Docker.LocalImage.build_7")):!0}};return d({onConfirm:async()=>{var t;await((t=m.value)==null?void 0:t.validate());const l=a.type==="path"?{path:a.path,tag:a.tag}:{data:a.data,tag:a.tag};await U(l),c.setRefresh(!0)}}),(l,t)=>{const v=N,g=D,i=S,b=y,k=w;return C(),E("div",V,[o(k,{ref_key:"formRef",ref:m,model:e(a),rules:h},{default:s(()=>[o(i,{label:l.$t("Docker.LocalImage.build_1"),path:"path"},{default:s(()=>[p("div",j,[o(v,{value:e(a).type,"onUpdate:value":t[0]||(t[0]=r=>e(a).type=r),options:f},null,8,["value"])]),u(p("div",A,[o(g,{value:e(a).path,"onUpdate:value":t[1]||(t[1]=r=>e(a).path=r),placeholder:l.$t("Docker.LocalImage.build_2")},null,8,["value","placeholder"])],512),[[_,e(a).type==="path"]])]),_:1},8,["label"]),u(o(i,{label:" ",path:"data"},{default:s(()=>[p("div",M,[o(B,{value:e(a).data,"onUpdate:value":t[2]||(t[2]=r=>e(a).data=r),lang:"json",theme:"monokai",height:"290","show-tips":!1},null,8,["value"])])]),_:1},512),[[_,e(a).type==="data"]]),o(i,{label:l.$t("Docker.LocalImage.build_3"),"show-feedback":!1},{default:s(()=>[p("div",O,[o(b,{value:e(a).tag,"onUpdate:value":t[3]||(t[3]=r=>e(a).tag=r),rows:3,placeholder:l.$t("Docker.LocalImage.build_4")},null,8,["value","placeholder"])])]),_:1},8,["label"])]),_:1},8,["model"])])}}});export{ta as default};
