<?php

namespace Limb_Chatbot\Includes\AI_Providers\Open_Router\Utilities;

use Limb_Chatbot\Includes\Data_Objects\Config;

/**
 * Class Key_Utility
 *
 * Minimal utility class for API key validation operations.
 * Used by Key_Endpoint during config validation when no full utility chain is available.
 *
 * @package Limb_Chatbot\Includes\AI_Providers\Open_Router\Utilities
 * @since 1.0.14
 */
class Key_Utility {

	/**
	 * Configuration object containing the API key.
	 *
	 * @var Config
	 * @since 1.0.14
	 */
	public Config $config;

	/**
	 * HTTP request timeout in seconds.
	 *
	 * @var int
	 * @since 1.0.14
	 */
	public int $timeout = 30;

	/**
	 * Key_Utility constructor.
	 *
	 * @param Config $config Configuration object with API key.
	 * @since 1.0.14
	 */
	public function __construct( Config $config ) {
		$this->config = $config;
	}

	/**
	 * Gets the configuration object.
	 *
	 * @return Config Config object.
	 * @since 1.0.14
	 */
	public function get_config(): Config {
		return $this->config;
	}

	/**
	 * Gets the timeout value for requests.
	 *
	 * @return int Timeout in seconds.
	 * @since 1.0.14
	 */
	public function get_timeout(): int {
		return $this->timeout;
	}
}
