using Microsoft.Extensions.Options;
using Tiku.Application.PlatformAdmin;
using Tiku.Application.Security;
using Tiku.Application.Tenancy;

namespace Tiku.Infrastructure.PlatformAdmin;

internal sealed record PlatformAdministrationDependencies(
    ICurrentAccessContext CurrentAccessContext,
    ITenantExecutionScope TenantExecutionScope,
    IOptions<TenantProvisioningOptions> ProvisioningOptions,
    IOptions<DomainLifecycleOptions> DomainOptions);

internal abstract partial class PlatformAdministrationServiceBase(PlatformAdministrationDependencies dependencies)
{
    protected ICurrentAccessContext currentAccessContext { get; } = dependencies.CurrentAccessContext;
    protected ITenantExecutionScope tenantExecutionScope { get; } = dependencies.TenantExecutionScope;
    protected DomainLifecycleOptions domains { get; } = dependencies.DomainOptions.Value;
    protected TenantProvisioningOptions provisioning { get; } = dependencies.ProvisioningOptions.Value;
}
