import "../init/initConfig.js";
const s = () => typeof window < "u" && Array.isArray(window.dataLayer), l = (t) => {
  if (!s())
    return;
  const e = {
    event: "ga_event",
    eventCategory: t.category,
    eventAction: t.action,
    eventLabel: t.label
  };
  t.value !== void 0 && t.value !== "" && (e.eventValue = t.value), window.dataLayer?.push(e);
}, u = (t, e) => (...a) => {
  const r = t(...a);
  return l(e), r;
}, v = {}, g = {}, y = (t) => {
  const { trigger: e, category: a, action: r, label: o, value: c } = t, i = r || `action_${e}`, n = {
    "data-track-ga-event-trigger": e,
    "data-track-ga-event-category": a,
    "data-track-ga-event-action": i
  };
  return o && (n["data-track-ga-event-label"] = o), c && (n["data-track-ga-event-value"] = c), n;
};
export {
  v as TRACKING_ACTIONS,
  g as TRACKING_LABELS,
  u as executeAndTrack,
  l as gaPush,
  y as getTrackingAttributes
};
//# sourceMappingURL=googleAnalyticsUtils.js.map
