namespace ZB.MOM.WW.OtOpcUa.Admin.Services;

/// <summary>
///     Points the Admin UI at the OPC UA Server's PKI store root so
///     <see cref="CertTrustService"/> can list and move certs between the
///     <c>rejected/</c> and <c>trusted/</c> directories the server maintains. Must match the
///     <c>OpcUaServer:PkiStoreRoot</c> the Server process is configured with.
/// </summary>
public sealed class CertTrustOptions
{
    public const string SectionName = "CertTrust";

    /// <summary>
    ///     Absolute path to the PKI root. Defaults to
    ///     <c>%ProgramData%\OtOpcUa\pki</c> — matches <c>OpcUaServerOptions.PkiStoreRoot</c>'s
    ///     default so a standard side-by-side install needs no override.
    /// </summary>
    public string PkiStoreRoot { get; init; } =
        Path.Combine(
            Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData),
            "OtOpcUa", "pki");
}
