mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-24 13:01:56 +00:00
26 lines
525 B
TypeScript
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,
|
|
})
|
|
);
|
|
}
|