import{B as _}from"./page-content.ac155fae.js";import{u as d}from"./hooks.f4063c52.js";import{q as k,B as m,r as g,o as B,n as v,t as l,H as u,p as D,v as f,a9 as P,aN as y,S as h}from"./index.7a111e62.js";function x(o){const e={};for(const a of o){const n=a.type==="checkbox",t=a.type==="date_picker";e[a.field]=n||t?[]:""}return e}const F={formConfig:{type:Object,required:!0}},S={class:"bg-white w-99/100 pl-8 pt-4"},b={style:{width:"100%"},flex:"","gap-2":""},w=h(" \u641C\u7D22 "),N=h(" \u91CD\u7F6E "),q=k({__name:"page-search",props:F,emits:["searchBtnClick","resetBtnClick"],setup(o,{emit:e}){const n=x(o.formConfig.formItems),t=m({...n});function c(){t.value={...n},e("resetBtnClick")}function i(){e("searchBtnClick",t.value)}return(r,s)=>{const p=g("el-button");return B(),v("div",S,[l(f(_),y(r.formConfig,{"form-data":t.value,"onUpdate:form-data":s[0]||(s[0]=C=>t.value=C)}),{action:u(()=>[D("div",b,[l(p,{type:"primary",icon:f(d)("search"),onClick:i},{default:u(()=>[w]),_:1},8,["icon"]),l(p,{icon:f(d)("refresh"),onClick:c},{default:u(()=>[N]),_:1},8,["icon"]),P(r.$slots,"action")])]),_:3},16,["form-data"])])}}});function I(o){const e=m(null);function a(t){const{result:c,deleteProps:i}=o?o(t):{result:{},deleteProps:[]},r={...t,...c};i.forEach(s=>delete r[s]),e.value.getPageData(r)}function n(){e.value.getPageData()}return{pageContentRef:e,handleSearchClick:a,handleResetClick:n}}export{q as _,I as u};
