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