using Tiku.Application.PlatformAdmin;
using Tiku.Application.Security;
using Tiku.Application.Tenancy;

namespace Tiku.Infrastructure.PlatformAdmin;

internal sealed class PlatformQuestionBankCatalogService(
    ICurrentAccessContext currentAccessContext,
    ITenantExecutionScope tenantExecutionScope)
    : PlatformQuestionBankServiceBase(currentAccessContext, tenantExecutionScope), IPlatformQuestionBankCatalogService
{
    public Task<IReadOnlyCollection<PlatformQuestionBankItem>> GetBanksAsync(
        PlatformAdminActor actor,
        PlatformQuestionBankFilter filter,
        CancellationToken cancellationToken = default) =>
        GetBanksCoreAsync(actor, filter, cancellationToken);

    public Task<PlatformQuestionBankItem> UpsertBankAsync(
        PlatformAdminActor actor,
        UpsertPlatformQuestionBankCommand command,
        CancellationToken cancellationToken = default) =>
        UpsertBankCoreAsync(actor, command, cancellationToken);

    public Task<PlatformQuestionBankItem> ArchiveBankAsync(
        PlatformAdminActor actor,
        Guid bankId,
        CancellationToken cancellationToken = default) =>
        ArchiveBankCoreAsync(actor, bankId, cancellationToken);
}
