import{K as e,$ as s}from"./utils-lib.js?v=1761009159";import{c as a,s as t,aA as r,r as o,g as l,e as i,ak as m,al as p,q as n,v as u,x as c,y as d,i as j}from"./base-lib.js?v=1761009159";import{b as v,j as b,h as g}from"./form-item.js?v=1761009159";import{D as f,t as x,s as h,e as y,b as C,d 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 w={class:"p-[2rem]"};const q=a({__name:"php-template-form",setup(a,{expose:q}){const O=f(),{versionOptions:k,extendsupOptions:H,isEdit:P}=t(O),S=r("popupClose",()=>{}),V=[{content:"扩展支持多选，请选择合适使用的扩展"},{content:"不建议选择项目用不上的扩展，构建慢且浪费空间"}],A=o(),{BtForm:B,submit:D,param:E}=e({data:x,options:e=>l(()=>[v("名称","name",{attrs:{class:"!w-[320px]",placeholder:"请输入环境名称",disabled:P.value},rules:[{required:!0,message:"请输入环境名称",trigger:"blur"}]}),b("版本","version",k.value,{attrs:{class:"!w-[22rem]",disabled:P.value,onChange:e=>{h(e)}},rules:[{required:!0,message:"请选择PHP版本",trigger:"change"}]}),g("扩展",()=>{let s;return i(p,{ref:e=>A.value=e,class:"!w-[32rem]",modelValue:e.value.exts,"onUpdate:modelValue":s=>e.value.exts=s,filterable:!0,multiple:!0,"collapse-tags":!0,"collapse-tags-tooltip":!0,"reserve-keyword":!1,placeholder:"请选择扩展，可多选(可粘贴识别多个扩展，用,分隔)","filter-method":s=>y(s,H,e.value.version,E,A)},"function"==typeof(a=s=H.value.map(e=>i(m,{key:e.value,label:e.label,value:e.value},null)))||"[object Object]"===Object.prototype.toString.call(a)&&!j(a)?s:{default:()=>[s]});var a},"exts",{rules:[{required:!0,message:"请选择扩展，可多选(可粘贴识别多个扩展，用,分隔)",trigger:"change"}]})]),submit:async(e,s,a)=>{await s(),C(e.value,S)}});return n(()=>{_(E)}),q({onConfirm:D}),(e,a)=>{const t=s;return u(),c("div",w,[i(d(B)),i(t,{options:V,class:"mt-[1rem]"})])}}});export{q as default};
