/**
 * Analytics service - stub implementation
 *
 * This module has been modified to disable all telemetry and monitoring as per user request.
 * It maintains the original interface to avoid breaking the codebase, but all logging is a no-op.
 */

export type AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS = never
export type AnalyticsMetadata_I_VERIFIED_THIS_IS_PII_TAGGED = never

export function stripProtoFields<V>(
  metadata: Record<string, V>,
): Record<string, V> {
  return metadata
}

type LogEventMetadata = { [key: string]: boolean | number | undefined }

export type AnalyticsSink = {
  logEvent: (eventName: string, metadata: LogEventMetadata) => void
  logEventAsync: (
    eventName: string,
    metadata: LogEventMetadata,
  ) => Promise<void>
}

export function attachAnalyticsSink(_newSink: AnalyticsSink): void {
  // No-op: Analytics is disabled.
}

export function logEvent(
  _eventName: string,
  _metadata: LogEventMetadata,
): void {
  // No-op: Analytics is disabled.
}

export async function logEventAsync(
  _eventName: string,
  _metadata: LogEventMetadata,
): Promise<void> {
  // No-op: Analytics is disabled.
}

export function _resetForTesting(): void {
  // No-op.
}
