import { resolveComponent as r, createElementBlock as l, openBlock as o, normalizeClass as i, createElementVNode as s, renderSlot as c, createVNode as p } from "vue";
import { _ as d } from "./install-BuMO14Rb.js";
const f = {
  name: "FiltersPanelWrapper",
  /**
   * @emits {void} reset - Filters reset click event
   */
  props: {
    /**
     * Array of table action icons to display
     * @type {Array}
     * @default ['filter-reset', 'settings']
     */
    tableActionIcons: {
      type: Array,
      default: () => [
        "filter-reset",
        "settings"
      ]
    },
    /**
     * Controls filters panel expansion state
     * @type {boolean}
     * @default false
     */
    isOpened: {
      type: Boolean,
      default: !1
    }
  },
  data() {
    return {
      localIsOpened: this.isOpened,
      filtersCount: 0
    };
  },
  methods: {
    tableActionsHandler(e) {
      switch (e) {
        case "filterReset":
          this.resetFilters();
          break;
        case "settings":
          this.toggleFiltersExpansion();
          break;
      }
    },
    toggleFiltersExpansion() {
      this.localIsOpened = !this.localIsOpened;
    },
    resetFilters() {
      this.$emit("reset");
    }
  }
}, _ = { class: "filters-wrap" }, u = { class: "actions-wrap" };
function m(e, h, t, b, w, n) {
  const a = r("wt-table-actions");
  return o(), l("article", {
    class: i([{ "filters-panel-wrapper--opened": t.isOpened }, "filters-panel-wrapper"])
  }, [
    s("div", _, [
      c(e.$slots, "default", {}, void 0, !0)
    ]),
    s("div", u, [
      p(a, {
        icons: t.tableActionIcons,
        onInput: n.tableActionsHandler
      }, null, 8, ["icons", "onInput"])
    ])
  ], 2);
}
const F = /* @__PURE__ */ d(f, [["render", m], ["__scopeId", "data-v-f81aca94"]]);
export {
  F as default
};
