using Microsoft.Extensions.Configuration;
using ZB.MOM.WW.Secrets.Replicator.SqlServer;

namespace ZB.MOM.WW.Secrets.Cli.Interactive;

/// <summary>A resolved deployment store target: the app's composed Secrets options + where they came from.</summary>
/// <param name="Name">Display name (defaults to the appsettings parent directory name).</param>
/// <param name="AppSettingsPath">The base <c>appsettings.json</c> path, or <see langword="null"/> for manual-entry targets.</param>
/// <param name="Secrets">The bound application secrets options, with <see cref="SecretsOptions.SqlitePath"/> already made absolute.</param>
/// <param name="SqlServer">The bound SQL-Server hub options when a <c>Secrets:SqlServer</c> section is present; otherwise <see langword="null"/>.</param>
/// <param name="Configuration">The full composed configuration, consumed later by the reference auditor.</param>
public sealed record StoreTarget(
    string Name,
    string? AppSettingsPath,
    SecretsOptions Secrets,
    SqlServerSecretsOptions? SqlServer,
    IConfigurationRoot Configuration);
