import { InjectionToken } from '@angular/core';

export interface OpenPanelConfig {
  /** Your OpenPanel Client ID (required) */
  clientId: string;

  /** URL of your OpenPanel API or self-hosted instance.
   *  Defaults to https://api.openpanel.dev */
  apiUrl?: string;

  /** Automatically track Angular Router navigation events as screen views.
   *  Default: true */
  trackScreenViews?: boolean;

  /** Track clicks on outgoing links automatically.
   *  Default: false */
  trackOutgoingLinks?: boolean;

  /** Enable declarative tracking via data-track HTML attributes.
   *  Default: false */
  trackAttributes?: boolean;

  /** Global properties sent with every event (e.g. app_version, environment). */
  globalProperties?: Record<string, string | number | boolean>;

  /** Completely disable all tracking (e.g. in test environments).
   *  Default: false */
  disabled?: boolean;

  /** Enable verbose console logging for debugging.
   *  Default: false */
  debug?: boolean;
}

export const OPENPANEL_CONFIG = new InjectionToken<OpenPanelConfig>('OPENPANEL_CONFIG');