import{d as D,r as u,f as C,M as L,o as p,x as c,w as s,g as n,q as f,a as l,y as M,Q as U,i as j,X as B,B as G,G as J,D as Q,J as R,_ as S,__tla as X}from"./index-7d5b26d3.js";import{_ as E,__tla as H}from"./Dialog-2be588df.js";import{b as I,__tla as K}from"./property-308ebf05.js";import{u as N,__tla as O}from"./useMessage-c81eaa5b.js";let y,T=Promise.all([(()=>{try{return X}catch{}})(),(()=>{try{return H}catch{}})(),(()=>{try{return K}catch{}})(),(()=>{try{return O}catch{}})()]).then(async()=>{y=S(D({name:"ProductPropertyForm",__name:"ProductPropertyAddForm",props:{propertyList:{type:Array,default:()=>{}}},setup(v,{expose:b}){const{t:h}=j(),P=N(),t=u(!1),o=u(!1),r=u({name:""}),w=C({name:[{required:!0,message:"\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}),d=u(),_=u([]),x=v;L(()=>x.propertyList,e=>{e&&(_.value=e)},{deep:!0,immediate:!0}),b({open:async()=>{t.value=!0,g()}});const V=async()=>{if(d&&await d.value.validate()){o.value=!0;try{const e=r.value,a=await I(e);_.value.push({id:a,...r.value,values:[]}),P.success(h("common.createSuccess")),t.value=!1}finally{o.value=!1}}},g=()=>{var e;r.value={name:""},(e=d.value)==null||e.resetFields()};return(e,a)=>{const F=B,k=G,A=J,i=Q,q=E,z=R;return p(),c(q,{modelValue:l(t),"onUpdate:modelValue":a[2]||(a[2]=m=>U(t)?t.value=m:null),title:"\u6DFB\u52A0\u5546\u54C1\u5C5E\u6027"},{footer:s(()=>[n(i,{disabled:l(o),type:"primary",onClick:V},{default:s(()=>[f("\u786E \u5B9A")]),_:1},8,["disabled"]),n(i,{onClick:a[1]||(a[1]=m=>t.value=!1)},{default:s(()=>[f("\u53D6 \u6D88")]),_:1})]),default:s(()=>[M((p(),c(A,{ref_key:"formRef",ref:d,model:l(r),rules:l(w),"label-width":"80px"},{default:s(()=>[n(k,{label:"\u5C5E\u6027\u540D\u79F0",prop:"name"},{default:s(()=>[n(F,{modelValue:l(r).name,"onUpdate:modelValue":a[0]||(a[0]=m=>l(r).name=m),placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])),[[z,l(o)]])]),_:1},8,["modelValue"])}}}),[["__file","D:/zx/mall-newfeifan-zx-business/src/views/mall/product/spu/form/ProductPropertyAddForm.vue"]])});export{T as __tla,y as default};
