Files
prowler/ui/components/findings/table/finding-group-selection.ts
2026-04-10 10:44:10 +02:00

26 lines
525 B
TypeScript

import { isFindingGroupMuted } from "@/lib/findings-groups";
interface FindingGroupSelectionState {
resourcesFail: number;
resourcesTotal?: number;
muted?: boolean;
mutedCount?: number;
}
export function canMuteFindingGroup({
resourcesFail,
muted,
mutedCount,
resourcesTotal,
}: FindingGroupSelectionState): boolean {
return (
resourcesFail > 0 &&
!isFindingGroupMuted({
muted,
mutedCount: mutedCount ?? 0,
resourcesFail,
resourcesTotal: resourcesTotal ?? 0,
})
);
}