import { j as r } from "../../node_modules/react/jsx-runtime.mjs";
import { create as f, useModal as h, antdDrawerV5 as y } from "../../node_modules/@ebay/nice-modal-react/lib/esm/index.mjs";
import { useMemo as x } from "react";
import F from "../BitzFloatLayout/index.mjs";
import "./index.less.mjs";
import j from "../../node_modules/antd/es/form/index.mjs";
import a from "../../node_modules/antd/es/button/button.mjs";
import w from "../../node_modules/antd/es/divider/index.mjs";
const D = (n) => {
  const { preserve: c, form: o, items: e, onReset: t, onFinish: l } = n, i = h(), m = () => {
    o.resetFields(), t == null || t(), i.hide();
  }, d = () => {
    const s = o.getFieldsValue();
    l == null || l(s), i.hide();
  }, u = /* @__PURE__ */ r.jsxs("div", { className: "QueryFilterDrawerFooter", children: [
    /* @__PURE__ */ r.jsx(a, { onClick: m, block: !0, size: "large", children: "重置" }),
    /* @__PURE__ */ r.jsx(w, { type: "vertical" }),
    /* @__PURE__ */ r.jsx(a, { onClick: d, block: !0, size: "large", type: "primary", children: "搜索" })
  ] }), p = x(() => (e == null ? void 0 : e.length) > 2 ? e.slice(1) : null, [e]);
  return /* @__PURE__ */ r.jsx(F, { ...y(i), title: "高级筛选", children: /* @__PURE__ */ r.jsxs("div", { className: "QueryFilterDrawerBody", children: [
    /* @__PURE__ */ r.jsx(j, { className: "QueryFilterDrawerForm", onReset: t, preserve: c, form: o, layout: "horizontal", children: p }),
    u
  ] }) });
}, C = f(D);
export {
  C as default
};
