"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.filterServersByLabels = filterServersByLabels;
/**
 * Filter servers by labels
 * @param servers List of servers
 * @param labelFilter Label filter as Record<string, string>
 * @returns Filtered servers
 */
function filterServersByLabels(servers, labelFilter) {
    return servers.filter(server => {
        if (!server.labels)
            return false;
        // Check if all filter labels match
        return Object.entries(labelFilter).every(([key, value]) => {
            return server.labels?.some(label => label.key === key && label.value === value);
        });
    });
}
