namespace GerbilManagerWebAPI.SaleAd
{
    /// <summary>
    /// FEAT-12a: provider-agnostic AI configuration (section "AI").
    ///
    /// Values come from ENVIRONMENT VARIABLES or user-secrets — NEVER from a
    /// committed appsettings file (Julian's directive). Env-var names:
    ///   AI__BaseUrl, AI__ApiKey, AI__Model
    ///
    /// Any endpoint that speaks the OpenAI-compatible chat-completions shape works:
    ///   Google Gemini : https://generativelanguage.googleapis.com/v1beta/openai
    ///   Groq          : https://api.groq.com/openai/v1
    ///   Mistral       : https://api.mistral.ai/v1
    ///   Ollama (lokal): http://&lt;host&gt;:11434/v1   (ApiKey beliebig, z. B. "ollama")
    /// </summary>
    public sealed class AiOptions
    {
        public const string SectionName = "AI";

        public string? BaseUrl { get; set; }
        public string? ApiKey { get; set; }
        public string? Model { get; set; }

        /// <summary>All three settings present -> the sale-ad endpoint is live.</summary>
        public bool IsConfigured =>
            !string.IsNullOrWhiteSpace(BaseUrl)
            && !string.IsNullOrWhiteSpace(ApiKey)
            && !string.IsNullOrWhiteSpace(Model);
    }
}
