import{c as e,h as a,r as s,o as l,k as r,l as o,e as t,x as m,p as i,q as p,N as n,a7 as d,a4 as c}from"./base-lib.js?v=1761009159";import{I as u,j as f,e as h}from"./utils-lib.js?v=1761009159";import{_ as g}from"./index101.js?v=1761009159";import{f as _}from"./validator.js?v=1761009159";import{g as b,bl as x}from"./useStore4.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./index104.js?v=1761009159";import"./column.js?v=1761009159";const j={class:"flex flex-col p-[1.6rem] lib-box"},v={class:"flex mt-[1.5rem]"},V=h(e({__name:"export-mirror-dialog",props:{compData:{default:()=>({})}},emits:["close"],setup(e,{expose:h,emit:V}){const w=e,y=V,{refs:{isRefreshTableList:q}}=b(),k=a({path:"",name:"",id:""}),C=s(),I={name:[{required:!0,message:"请输入文件名",trigger:["blur","change"]}],path:[{required:!0,message:"请输入镜像路径",trigger:["blur","change"]}]},S=()=>{_({type:"dir",change:e=>{k.path=e}})};l((()=>{k.id=w.compData.row.id}));return h({onConfirm:async()=>{await C.value.validate((async e=>{e&&u({request:x({data:JSON.stringify(k)}),message:!0,success:({status:e})=>{e&&(q.value=!0,y("close"))}})}))}}),(e,a)=>{const s=g,l=d,u=f,h=c;return r(),o("div",j,[t(h,{ref_key:"cmdFormRef",ref:C,size:"small",model:i(k),rules:I,class:"relative w-full","label-position":"right",onSubmit:a[3]||(a[3]=n((()=>{}),["prevent"]))},{default:m((()=>[t(l,{prop:"path",label:"路径"},{default:m((()=>[t(s,{modelValue:i(k).path,"onUpdate:modelValue":a[0]||(a[0]=e=>i(k).path=e),class:"!w-[24rem]",icon:"icon-file_mode",onIconClick:S,onChangePassive:a[1]||(a[1]=e=>{k.path=k.path.replace(/\s+/g,"")}),placeholder:"请输入镜像路径"},null,8,["modelValue"])])),_:1}),p("div",v,[t(l,{prop:"name",label:"文件名"},{default:m((()=>[t(u,{modelValue:i(k).name,"onUpdate:modelValue":a[2]||(a[2]=e=>i(k).name=e),class:"w-[24rem]",placeholder:"请输入导出的文件名"},null,8,["modelValue"])])),_:1}),a[4]||(a[4]=p("span",{class:"ml-[1rem] text-[#666] flex items-center"},".tar",-1))])])),_:1},8,["model"])])}}}),[["__scopeId","data-v-d73424a9"]]);export{V as default};
