import { useMemo as a } from "../../external/.pnpm/preact@10.28.2/node_modules/preact/hooks/dist/hooks.module.js";
import d from "../../core/Context/analytics/preact/useAnalyticsContext.js";
const m = ({ category: t, label: e, subCategory: n }) => {
  const o = d();
  return { logEvent: a(() => {
    if (t && e) {
      const s = {
        ...n && { subCategory: n },
        actionType: "reset",
        category: t,
        label: e
      };
      return (r, i) => {
        try {
          o.addModifyFilterEvent?.({
            ...s,
            ...r === "update" ? { actionType: r, value: i } : {}
          });
        } catch (c) {
          console.error(c);
        }
      };
    }
  }, [o, t, e, n]) };
};
export {
  m as default
};
