import { jsx as c } from "@emotion/react/jsx-runtime";
import { useEnvironment as m, useModuleDictionary as a } from "@m4l/core";
import { pathIcons as p } from "../../../../icons.js";
import { DICTIONARY as i } from "../../../../dictionary.js";
import { useFilters as f } from "../../../../hooks/shared/useFilters/useFilters.js";
import { useDataGrid as I } from "../../../../hooks/shared/useDataGrid/useDataGrid.js";
import { IconButton as u } from "../../../../../extended/mui/IconButton/IconButton.js";
function D() {
  const { activeFilters: t, setActiveFilters: r } = f(), { host_static_assets: n, environment_assets: s } = m(), { getLabel: o } = a(), { externalFilterSettings: e } = I(), l = () => {
    e ? e.onChange?.({
      action: "openPopoverMenuFields"
    }) : r(!t);
  };
  return /* @__PURE__ */ c(
    u,
    {
      tooltip: o(t ? i.TOOLTIP_FILTER_HIDE : i.TOOLTIP_FILTER_SHOW),
      onClick: l,
      "aria-label": "filter",
      icon: `${n}/${s}/${p.filter}`
    }
  );
}
export {
  D as Filter
};
