"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),t=require("@aplus-frontend/antdv"),C=require("@aplus-frontend/icon");require("../../../config-provider/index.js");const v=require("../../style/search-form.js"),y=require("../hooks/use-collapse-input-count.js"),h=require("../../../config-provider/hooks/use-namespace.js"),k=require("../../../config-provider/hooks/use-locale.js"),x=e.defineComponent({name:"ApFormSearchFormPopoverFilter",__name:"popover-filter",props:{config:{},onSubmit:{type:Function},submitLoading:{type:Boolean}},setup(r){const p=r,f=e.ref(),{e:c,b:u}=h.useNamespace("ap-form-search-form"),d=v.default("ap-form-search-form"),{t:l}=k.useLocale(),n=e.ref(!1),m=e.toRef(()=>p.config),{count:i}=y.useCollapseInputCount(m);function g(s){return s?.closest(".ant-form")||document.body}return(s,a)=>(e.openBlock(),e.createBlock(e.unref(t.Popover),{open:n.value,"onUpdate:open":a[1]||(a[1]=o=>n.value=o),"overlay-class-name":`${e.unref(c)("popover")} ${e.unref(d)}`,trigger:"click",placement:"bottom",mask:"","mask-style":{backgroundColor:"transparent"},"get-popup-container":g,"force-render":!0},{content:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass([e.unref(c)("popover-content")]),style:{paddingBottom:"4px",width:"825px"}},[e.createVNode(e.unref(t.Row),{gutter:8},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.config,o=>(e.openBlock(),e.createBlock(e.unref(t.Col),{key:o.key,span:8},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.node)))]),_:2},1024))),128))]),_:1})],2),e.createVNode(e.unref(t.Divider),{style:{margin:"0"}}),e.createElementVNode("div",{class:e.normalizeClass(e.unref(c)("popover-footer"))},[e.createVNode(e.unref(t.Flex),{justify:"end",gap:10},{default:e.withCtx(()=>[e.createVNode(e.unref(t.Button),{onClick:a[0]||(a[0]=o=>n.value=!1)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("ap.common.cancelText")),1)]),_:1}),e.createVNode(e.unref(t.Button),{type:"primary",loading:r.submitLoading,onClick:r.onSubmit},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("ap.apForm.search.search")),1)]),_:1},8,["loading","onClick"])]),_:1})],2)]),default:e.withCtx(()=>[e.createVNode(e.unref(t.Tooltip),{title:e.unref(l)("ap.apForm.search.moreFilter"),placement:"top"},{default:e.withCtx(()=>[e.createVNode(e.unref(t.Button),{ref_key:"triggerBtnRef",ref:f,class:e.normalizeClass([e.unref(u)("trigger-btn"),{[e.unref(u)("trigger-btn-active")]:n.value}])},{icon:e.withCtx(()=>[e.withDirectives(e.createElementVNode("sup",{class:e.normalizeClass(e.unref(u)("trigger-btn-badge"))},e.toDisplayString(e.unref(i)),3),[[e.vShow,e.unref(i)!==0]]),e.createVNode(e.unref(C.IconApFilterOutlined),{size:14})]),_:1},8,["class"])]),_:1},8,["title"])]),_:1},8,["open","overlay-class-name"]))}});exports.default=x;
