"use client"; import { memo } from "react"; import { logger } from "../../../lib/logger"; import { RuleStackView } from "./RuleStack.view"; import type { RuleStackProps } from "./RuleStack.types"; declare global { interface Window { gtag?: ( _command: string, _eventName: string, _params?: Record, ) => void; analytics?: { track: (_eventName: string, _params?: Record) => void; }; } } const RuleStackContainer = memo(({ className = "" }) => { const handleTemplateClick = (templateName: string) => { // Basic analytics tracking if (typeof window !== "undefined") { if (window.gtag) { window.gtag("event", "template_click", { template_name: templateName, }); } if (window.analytics) { window.analytics.track("Template Clicked", { templateName: templateName, }); } } logger.debug(`${templateName} template clicked`); }; return ( ); }); RuleStackContainer.displayName = "RuleStack"; export default RuleStackContainer;