import{c as e,s as a,aA as s,g as r,e as o,C as t,I as l,c2 as i,az as p,G as m,q as u,v as n,x as c,y as d}from"./base-lib.js?v=1761009159";import{K as v,k as j}from"./utils-lib.js?v=1761009159";import{b as g,j as h,a as f,h as x}from"./form-item.js?v=1761009159";import{i as b,j as w,k as C,l as M,m as y,n as _}from"./index198.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./index106.js?v=1761009159";import"./index105.js?v=1761009159";import"./column.js?v=1761009159";import"./useController4.js?v=1761009159";import"./validator.js?v=1761009159";import"./useController5.js?v=1761009159";import"./site.js?v=1761009159";import"./useStore4.js?v=1761009159";import"./useController6.js?v=1761009159";import"./useMethod5.js?v=1761009159";const k={class:"p-[2rem] max-h-[60rem] overflow-auto"},X=e({__name:"java-form",setup(e,{expose:X}){const q=b(),{versionOptions:F,popoverFocus:z,isEdit:U}=a(q),V=s("popupClose",()=>{}),{BtForm:A,submit:B,param:E}=v({data:w,options:e=>r(()=>[g("名称","name",{attrs:{class:"!w-[320px]",placeholder:"请输入环境名称",disabled:U.value},rules:[{required:!0,message:"请输入环境名称",trigger:"blur"}]}),h("版本","version",F.value,{attrs:{class:"!w-[22rem]",disabled:U.value},rules:[{required:!0,message:"请选择Java版本",trigger:"change"}]}),f("运行目录","path",{attrs:{class:"!w-[320px]",placeholder:"请选择运行目录"},rules:[{required:!0,message:"请选择运行目录",trigger:"change"}],icon:"icon-file_mode",iconClick:()=>{C(e)}}),x("启动命令",()=>o(p,{ref:"javapopover",placement:"top-start","popper-class":"green-tips-popover !p-0",title:"",width:"440",visible:z.value,"onUpdate:visible":e=>z.value=e,"trigger-keys":[],trigger:"focus"},{default:()=>o("div",{class:"!p-[12px] bg-primary text-white"},[t("请填写完整启动命令，如：java -jar halo.jar -Xmx1024M -Xms256M")]),reference:()=>l(o(j,{modelValue:e.value.command,"onUpdate:modelValue":a=>e.value.command=a,type:"textarea",width:"52rem",rows:7,resize:"none",onFocus:()=>{z.value=!0},placeholder:"请填写完整启动命令，如：java -jar halo.jar -Xmx1024M -Xms256M"},null),[[i,"javapopover"]])}),"command",{attrs:{class:"!w-[52rem]"},rules:[{required:!0,message:"请填写完整启动命令，如：java -jar halo.jar -Xmx1024M -Xms256M",trigger:"change"}]}),...e.value.port&&e.value.port.length>0?[M(e.value.port),x(" ",()=>o(m,{type:"default",onClick:()=>{e.value.port.push({server:"",con:"",output:!1,protocol:["tcp"],id:1})}},{default:()=>[t("添加")]}))]:[x("端口",()=>o(m,{type:"default",onClick:()=>{e.value.port.push({server:"",con:"",output:!1,protocol:["tcp"],id:1e3*Math.random()})}},{default:()=>[t("添加")]}))]]),submit:async(e,a,s)=>{await a(),y(e.value,V)}});return u(()=>{_(E)}),X({onConfirm:B}),(e,a)=>(n(),c("div",k,[o(d(A))]))}});export{X as default};
