using Microsoft.EntityFrameworkCore;
using Monitoring.Core.Domain.EventManagement;
using Monitoring.Infrastructure.Data;

namespace Monitoring.Features.AlarmManagement.Skippers;

internal sealed class AcceptedStatusSkipper(IDataContext dataContext) : ISkipper
{
	public async Task<bool> Test(AlarmScope scope, AlarmScopeStatus status)
	{
		var hasCameras = await dataContext.Cameras.AnyAsync(x => x.AssetId == scope.AssetId);
		return !hasCameras;
	}
}
