namespace StellaOps.Excititor.Connectors.Abstractions;

/// <summary>
/// Customisation options for connector options binding.
/// </summary>
public sealed class VexConnectorOptionsBinderOptions
{
    /// <summary>
    /// Indicates whether environment variables should be expanded in option values.
    /// Defaults to <c>true</c>.
    /// </summary>
    public bool ExpandEnvironmentVariables { get; set; } = true;

    /// <summary>
    /// When <c>true</c> the binder trims whitespace around option values.
    /// </summary>
    public bool TrimWhitespace { get; set; } = true;

    /// <summary>
    /// Converts empty strings to <c>null</c> before binding. Default: <c>true</c>.
    /// </summary>
    public bool TreatEmptyAsNull { get; set; } = true;

    /// <summary>
    /// When <c>false</c>, binding fails if unknown configuration keys are provided.
    /// Default: <c>true</c> (permitting unknown keys).
    /// </summary>
    public bool AllowUnknownKeys { get; set; } = true;

    /// <summary>
    /// Enables <see cref="System.ComponentModel.DataAnnotations"/> validation after binding.
    /// Default: <c>true</c>.
    /// </summary>
    public bool ValidateDataAnnotations { get; set; } = true;

    /// <summary>
    /// Optional post-configuration callback executed after binding.
    /// </summary>
    public Action<object>? PostConfigure { get; set; }

    /// <summary>
    /// Optional hook to transform raw configuration values before binding.
    /// </summary>
    public Func<string, string?, string?>? ValueTransformer { get; set; }
}
