// src/libs/posthog/native.ts
import { PostHog } from "posthog-react-native";
var posthogKey = process.env.NEXT_PUBLIC_CONTRACTSPEC_POSTHOG_KEY;
var posthogHost = process.env.NEXT_PUBLIC_POSTHOG_HOST || "https://eu.posthog.com";
function initPosthog() {
  const posthogKey2 = process.env.NEXT_PUBLIC_CONTRACTSPEC_POSTHOG_KEY;
  const posthogHost2 = process.env.NEXT_PUBLIC_POSTHOG_HOST || "https://eu.posthog.com";
  if (!posthogKey2) {
    console.warn("[PostHog] NEXT_PUBLIC_CONTRACTSPEC_POSTHOG_KEY is missing");
    throw new Error("NEXT_PUBLIC_CONTRACTSPEC_POSTHOG_KEY is missing");
  }
  const posthog = new PostHog(posthogKey2, {
    host: posthogHost2
  });
  return posthog;
}
var posthog = initPosthog();
export {
  posthogKey,
  posthogHost,
  posthog,
  initPosthog
};
