<?php
/**
 * Backward-compatible Anthropic client wrapper.
 *
 * @package Ugcify\AI
 */

namespace Ugcify\AI;

// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

class AnthropicClient extends AnthropicProvider {
	/**
	 * Constructor.
	 */
	public function __construct() {
		parent::__construct( AISettings::get_settings() );
	}

	/**
	 * Get effective settings in the old Anthropic-only shape.
	 *
	 * @return array<string,mixed>
	 */
	public function get_settings(): array {
		$settings = AISettings::get_settings();

		return array(
			'enabled'           => (bool) $settings['enabled'],
			'anthropic_api_key' => AISettings::get_api_key( 'anthropic', $settings ),
			'model'             => AISettings::get_model( 'anthropic', $settings ),
			'max_candidates'    => (int) $settings['max_candidates'],
			'max_suggestions'   => (int) $settings['max_suggestions'],
			'min_confidence'    => (float) $settings['min_confidence'],
		);
	}
}
