import { PrivacyConfig } from "../core/privacy.js";
import { AmplitudeLike, AmplitudeOrAI, AnthropicResponse, TrackFn } from "../types.js";
import { BaseAIProvider, ProviderTrackOptions } from "./base.js";

//#region src/providers/anthropic.d.ts

declare const ANTHROPIC_AVAILABLE: boolean;
declare const _AnthropicModule: Record<string, unknown> | null;
interface AnthropicOptions {
  amplitude: AmplitudeOrAI;
  apiKey?: string;
  privacyConfig?: PrivacyConfig | null;
  propagateContext?: boolean;
  /** Pass the `@anthropic-ai/sdk` module directly to bypass `tryRequire` (required in bundler environments). */
  anthropicModule?: unknown;
}
declare class Anthropic<TClient extends Record<string, unknown> = Record<string, unknown>> extends BaseAIProvider {
  private _client;
  readonly messages: WrappedMessages;
  private _propagateContext;
  constructor(options: AnthropicOptions);
  get client(): TClient;
}
declare class WrappedMessages {
  _original: Record<string, unknown>;
  private _trackFn;
  private _amplitude;
  private _privacyConfig;
  private _propagateContext;
  constructor(client: unknown, trackFn: TrackFn, amplitude: AmplitudeLike, privacyConfig: PrivacyConfig | null, propagateContext: boolean);
  create(params: Record<string, unknown>, amplitudeOverrides?: ProviderTrackOptions): Promise<AnthropicResponse | AsyncIterable<unknown>>;
  private _wrapStream;
  private _withContextHeaders;
  private _trackInputMessages;
  /**
   * Extract tool call events from Anthropic message arrays.
   *
   * Anthropic tool results appear as content blocks with type "tool_result"
   * inside role: "user" messages. We correlate tool_use_id with tool_use
   * blocks in the preceding assistant message to get tool names and inputs.
   */
  private _extractToolCalls;
}
declare function extractAnthropicSystemPrompt(system: unknown): string | undefined;
declare function extractAnthropicContent(content: Array<Record<string, unknown>> | undefined): {
  text: string;
  reasoning: string | undefined;
  toolCalls: Array<Record<string, unknown>>;
};
//#endregion
export { ANTHROPIC_AVAILABLE, Anthropic, AnthropicOptions, WrappedMessages, _AnthropicModule, extractAnthropicContent, extractAnthropicSystemPrompt };
//# sourceMappingURL=anthropic.d.ts.map