using LiteCqrs;
using TeleWave.Application.Common.Interfaces;

namespace TeleWave.Application.Metadata.GetProviders;

public sealed class GetMetadataProvidersQueryHandler(IMetadataProviderResolver resolver)
    : IQueryHandler<GetMetadataProvidersQuery, IReadOnlyList<string>>
{
    public Task<IReadOnlyList<string>> Handle(
        GetMetadataProvidersQuery query,
        CancellationToken cancellationToken
    ) => Task.FromResult(resolver.AvailableKeys);
}
