import{B as _}from"./basic-form.147ada95.js";import{u as m}from"./hooks.3def80f5.js";import{q as g,B as h,r as k,o as B,n as v,t as f,H as p,p as D,v as d,a9 as P,aY as y,S as C}from"./index.d8ce26ef.js";function x(a){const o={};for(const e of a){const s=e.type==="checkbox",n=e.type==="date_picker",t=e.type==="range";o[e.field]=s||n||t?[]:""}return o}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":""},w=C(" \u641C\u7D22 "),b=C(" \u91CD\u7F6E "),q=g({__name:"page-search",props:F,emits:["searchBtnClick","resetBtnClick"],setup(a,{emit:o}){const s=x(a.formConfig.formItems),n=h({...s});function t(){n.value={...s},o("resetBtnClick")}function l(){o("searchBtnClick",n.value)}return(i,r)=>{const c=k("el-button");return B(),v("div",R,[f(d(_),y(i.formConfig,{"form-data":n.value,"onUpdate:form-data":r[0]||(r[0]=u=>n.value=u)}),{action:p(()=>[D("div",S,[f(c,{type:"primary",icon:d(m)("search"),onClick:l},{default:p(()=>[w]),_:1},8,["icon"]),f(c,{icon:d(m)("refresh"),onClick:t},{default:p(()=>[b]),_:1},8,["icon"]),P(i.$slots,"action")])]),_:3},16,["form-data"])])}}});function I(a,o){const e=h(null);function s(t){var c;const{result:l,deleteProps:i}=a?a(t):{result:{},deleteProps:[]},r={...t,...l};i.forEach(u=>delete r[u]),(c=e.value)==null||c.getPageData(r)}function n(){var t;(t=e.value)==null||t.getPageData(),o&&o()}return{pageContentRef:e,handleSearchClick:s,handleResetClick:n}}export{q as _,I as u};
