import{aP as a,P as e,iC as s,K as t,_ as r}from"./utils-lib.js?v=1761009159";import{c as l,aA as o,g as i,e as p,v as m,x as u,y as d}from"./base-lib.js?v=1761009159";import{d as n,j as c,l as v,h as g,c as f}from"./form-item.js?v=1761009159";import{f as h}from"./validator.js?v=1761009159";import{B as b}from"./index115.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./index106.js?v=1761009159";import"./column.js?v=1761009159";import"./ace.js?v=1761009159";const{refs:{isRefreshTableList:x}}=a(),y=[{label:"路径",value:"path"},{label:"内容",value:"data"}],j={class:"flex flex-col p-[1.6rem] lib-box"},w=r(l({__name:"index",setup(a,{expose:r}){const l=o("popupClose",()=>{}),{BtForm:w,submit:_}=t({data:()=>({type:"path",path:"",data:"",tag:""}),options:a=>i(()=>[n([c("Dockerfile","type",y,{attrs:{class:"!w-[10rem]"},rules:[{required:!0,message:"请选择",trigger:"change"}]}),..."path"==a.value.type?[v("","path",{attrs:{class:"!w-[21rem] ml-[.5rem]",placeholder:"请输入或选择Dockerfile文件"},rules:[{validator:(...e)=>((a,e,s,t)=>{"path"!==a.value.type||s||t(new Error("请输入路径")),t()})(a,...e),trigger:"change"}]},()=>(a=>{h({type:"file",change:e=>{a.value.path=e}})})(a))]:[]]),..."data"==a.value.type?[g(" ",()=>p(b,{class:"w-[32rem] h-[29.3rem]",modelValue:a.value.data,"onUpdate:modelValue":e=>a.value.data=e},null),"data",{rules:[{validator:(...e)=>((a,e,s,t)=>{"data"!==a.value.type||s||t(new Error("请输入内容")),t()})(a,...e),trigger:"blur"}]})]:[],f("标签","tag",{attrs:{placeholder:"请输入镜像名，例如：btnginx:1.24",autosize:{minRows:5,maxRows:5},resize:"none",class:"w-[320px]"}})]),submit:async(a,t,r)=>{await t(),(async(a,t)=>{const r="data"===a.value.type?{data:a.value.data,tag:a.value.tag}:{path:a.value.path,tag:a.value.tag};await e({request:s({data:JSON.stringify(r)}),message:!0,success:({status:a})=>{a&&(t(),x.value=!0)}})})(a,l)}});return r({onConfirm:_}),(a,e)=>(m(),u("div",j,[p(d(w))]))}}),[["__scopeId","data-v-7afaab66"]]);export{w as default};
