export class EntityFamilyChecker {
    static hasAnyFamily(entity, ...families) {
        try {
            const check = families.some(family => {
                const matchingEntities = entity.dimension.getEntities({
                    location: entity.location,
                    maxDistance: 0,
                    closest: 1,
                    families: [family],
                });
                return matchingEntities.length > 0;
            });
            return check;
        }
        catch (error) {
            return undefined;
        }
    }
    static hasAllFamilies(entity, ...families) {
        try {
            const check = Boolean(entity.dimension.getEntities({
                location: entity.location,
                maxDistance: 0,
                closest: 1,
                families: families
            }).length);
            return check;
        }
        catch (error) {
            return undefined;
        }
    }
}
