import{r as t,h as e}from"./p-CV0Pyo1O.js";import{B as a}from"./p-CHo7TfsM.js";import{a4 as s,a5 as r}from"./p-CPKMvyV_.js";const c=t=>{const e=["after_cursor","before_cursor"];return!!Object.keys(t).filter((t=>!e.includes(t))).length},d=class{constructor(e){t(this,e),this.showClearButton=!1}watchParamsHandler(t){this.showClearButton=c(t)}show(){this.menu.classList.add("show")}hide(){this.menu.classList.remove("show")}componentWillLoad(){this.showClearButton=c(this.params)}render(){return e("div",{key:"bcecb736427ce7859174c8f91938f720f8e32782",class:"d-flex gap-2"},e("div",{key:"aadd72cb3aac3d676a340068304802dbc5dfeab2",class:"dropdown pb-3"},e("button",{key:"2dbb5590ea8ed60d2228b0f0b262332e5d377810",type:"button dropdown-toggle",ref:t=>this.anchorButton=t,class:"btn btn-primary dropdown-toggle",part:s,"data-test-id":"open-filters-button","data-bs-toggle":"dropdown"},"Filters"),e("custom-popper",{key:"c516ec2550207e3acc3d0186c6f86d351a6ca4a9",offset:[20,10],strategy:"fixed",anchorRef:this.anchorButton,trigger:"click"},e("form",{key:"4ee1c1bd0e5c9eacccb857986d3f2e37bb3d990b",class:"dropdown-menu",part:r,"data-test-id":"filter-menu",ref:t=>this.menu=t,onSubmit:t=>t.preventDefault()},e("slot",{key:"b274f915722d1a59af4578935c4233bcf700c7b2"})))),e("div",{key:"ce527862135dd31b9b198133a3a2c19699419c5d"},e(a,{key:"272022c173de7f8c41ba7a88cf5aa004da11b3a2",variant:"secondary",onClick:()=>this.clearParams(),hidden:!this.showClearButton,"data-test-id":"clear-filters-button"},"Clear Filters")))}static get watchers(){return{params:["watchParamsHandler"]}}};export{d as table_filters_menu}