"use client";

import { BlogTelemetryProvider, type BlogTelemetry } from "@blog";
import { logClientEvent } from "@/lib/axiom/client";
import type { EventData } from "@/lib/axiom/client";

const clientTelemetry: BlogTelemetry = {
  logClientEvent: (name, data) => logClientEvent(name, data as EventData),
  logServerEvent: () => {},
};

export default function BlogTelemetryClientProvider({
  children,
}: {
  children: React.ReactNode;
}) {
  return (
    <BlogTelemetryProvider telemetry={clientTelemetry}>
      {children}
    </BlogTelemetryProvider>
  );
}
