import{b as E,p as o,e as V,k as u,o as y,h as x,A as s,j as i,a as b,l as p,f}from"./index.4d3e3847.js";const F={class:"w-full flex justify-end"},j=E({__name:"ladder-modal",emits:["push","update"],setup(N,{expose:m,emit:C}){const r={budget_price:"0.00",good_type:"1",good_name:"",cat_info:[],num:"0"},a=o(!1),n=o(!1),v=o(null),d=o("0"),l=o({...r}),_=V(()=>a.value?"\u4FEE\u6539\u5546\u54C1\u8981\u6C42":"\u6DFB\u52A0\u5546\u54C1\u8981\u6C42");function g(){v.value.validate(e=>{!e||(C(a.value?"update":"push",f(l),f(d)),n.value=!1)})}return m({onDisplay:(e,t="0")=>{e&&(e.cat_info=[],l.value=e,d.value=t),n.value=!0,a.value=!!e}}),(e,t)=>{const D=u("PageContent"),c=u("ElButton"),B=u("ElDialog");return y(),x(B,{center:"",title:f(_),modelValue:n.value,"onUpdate:modelValue":t[1]||(t[1]=k=>n.value=k),onClose:t[2]||(t[2]=()=>l.value={...r})},{default:s(()=>[i(D,{ref:"pageContentRef","content-config":e.contentConfig,onCreateBtnClick:e.handleCreateData},null,8,["content-config","onCreateBtnClick"]),b("div",F,[i(c,{type:"primary",onClick:g},{default:s(()=>[p("\u4FDD\u5B58")]),_:1}),i(c,{onClick:t[0]||(t[0]=()=>n.value=!1)},{default:s(()=>[p("\u53D6\u6D88")]),_:1})])]),_:1},8,["title","modelValue"])}}});export{j as default};
