namespace ZB.MOM.WW.ScadaBridge.Commons.Types.Transport;

// Inbound API keys are intentionally absent from the transport selection: per the
// inbound-API-key re-architecture, keys are NOT carried between
// environments. They live in the per-environment SQLite store (per-env pepper +
// secret-shown-once) and are re-created/re-granted via the admin UI/CLI on the
// destination. Only API *methods* travel in a bundle.
public sealed record ExportSelection(
    IReadOnlyList<int> TemplateIds,
    IReadOnlyList<int> SharedScriptIds,
    IReadOnlyList<int> ExternalSystemIds,
    IReadOnlyList<int> DatabaseConnectionIds,
    IReadOnlyList<int> NotificationListIds,
    IReadOnlyList<int> SmtpConfigurationIds,
    IReadOnlyList<int> ApiMethodIds,
    bool IncludeDependencies,
    // Additive: site/instance-scoped export. Defaulted to empty so every
    // existing positional caller keeps compiling; older callers select no sites/instances.
    IReadOnlyList<int>? SiteIds = null,
    IReadOnlyList<int>? InstanceIds = null,
    // Additive: SMS provider config export, mirroring SmtpConfigurationIds.
    // Defaulted null (trailing) so every existing positional caller keeps compiling;
    // older callers select no SMS configs.
    IReadOnlyList<int>? SmsConfigurationIds = null)
{
    /// <summary>Sites selected for site/instance-scoped export. Never null.</summary>
    public IReadOnlyList<int> SiteIds { get; init; } = SiteIds ?? Array.Empty<int>();

    /// <summary>Instances selected for site/instance-scoped export. Never null.</summary>
    public IReadOnlyList<int> InstanceIds { get; init; } = InstanceIds ?? Array.Empty<int>();

    /// <summary>SMS provider configurations selected for export. Never null.</summary>
    public IReadOnlyList<int> SmsConfigurationIds { get; init; } = SmsConfigurationIds ?? Array.Empty<int>();
}
