/**
 * @fileoverview MCP Filter Panel Component
 *
 * Provides filtering controls for the MCP Dashboard.
 * Matches the pattern used by agent-filter-panel component.
 *
 * @module MCP Filter Panel
 */
import { Component, Input, Output, EventEmitter } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/forms";
const _forTrack0 = ($index, $item) => $item.value;
const _forTrack1 = ($index, $item) => $item.ID;
const _forTrack2 = ($index, $item) => $item.category;
function MCPFilterPanelComponent_Conditional_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 2);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(ctx_r0.activeFilterCount);
} }
function MCPFilterPanelComponent_For_24_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "option", 15);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const option_r2 = ctx.$implicit;
    i0.ɵɵproperty("value", option_r2.value);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(option_r2.text);
} }
function MCPFilterPanelComponent_Conditional_25_For_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "option", 15);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const option_r4 = ctx.$implicit;
    i0.ɵɵproperty("value", option_r4.value);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(option_r4.text);
} }
function MCPFilterPanelComponent_Conditional_25_Template(rf, ctx) { if (rf & 1) {
    const _r3 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 9)(1, "label", 10);
    i0.ɵɵelement(2, "span", 19);
    i0.ɵɵtext(3, " Server Status ");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "select", 14);
    i0.ɵɵlistener("ngModelChange", function MCPFilterPanelComponent_Conditional_25_Template_select_ngModelChange_4_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onServerStatusChange($event)); });
    i0.ɵɵrepeaterCreate(5, MCPFilterPanelComponent_Conditional_25_For_6_Template, 2, 2, "option", 15, _forTrack0);
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("ngModel", ctx_r0.filters.serverStatus);
    i0.ɵɵadvance();
    i0.ɵɵrepeater(ctx_r0.serverStatusOptions);
} }
function MCPFilterPanelComponent_Conditional_26_For_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "option", 15);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const option_r6 = ctx.$implicit;
    i0.ɵɵproperty("value", option_r6.value);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(option_r6.text);
} }
function MCPFilterPanelComponent_Conditional_26_Template(rf, ctx) { if (rf & 1) {
    const _r5 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 9)(1, "label", 10);
    i0.ɵɵelement(2, "span", 20);
    i0.ɵɵtext(3, " Connection Status ");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "select", 14);
    i0.ɵɵlistener("ngModelChange", function MCPFilterPanelComponent_Conditional_26_Template_select_ngModelChange_4_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onConnectionStatusChange($event)); });
    i0.ɵɵrepeaterCreate(5, MCPFilterPanelComponent_Conditional_26_For_6_Template, 2, 2, "option", 15, _forTrack0);
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("ngModel", ctx_r0.filters.connectionStatus);
    i0.ɵɵadvance();
    i0.ɵɵrepeater(ctx_r0.connectionStatusOptions);
} }
function MCPFilterPanelComponent_Conditional_27_For_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "option", 15);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const s_r8 = ctx.$implicit;
    i0.ɵɵproperty("value", s_r8.ID);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(s_r8.Name);
} }
function MCPFilterPanelComponent_Conditional_27_For_17_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "option", 15);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const c_r9 = ctx.$implicit;
    i0.ɵɵproperty("value", c_r9.category);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate2("", c_r9.category, " (", c_r9.count, ")");
} }
function MCPFilterPanelComponent_Conditional_27_Template(rf, ctx) { if (rf & 1) {
    const _r7 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 9)(1, "label", 10);
    i0.ɵɵelement(2, "span", 19);
    i0.ɵɵtext(3, " Server");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "select", 14);
    i0.ɵɵlistener("ngModelChange", function MCPFilterPanelComponent_Conditional_27_Template_select_ngModelChange_4_listener($event) { i0.ɵɵrestoreView(_r7); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onToolsServerChange($event)); });
    i0.ɵɵelementStart(5, "option", 21);
    i0.ɵɵtext(6, "All Servers");
    i0.ɵɵelementEnd();
    i0.ɵɵrepeaterCreate(7, MCPFilterPanelComponent_Conditional_27_For_8_Template, 2, 2, "option", 15, _forTrack1);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(9, "div", 9)(10, "label", 10);
    i0.ɵɵelement(11, "span", 22);
    i0.ɵɵtext(12, " Category");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(13, "select", 14);
    i0.ɵɵlistener("ngModelChange", function MCPFilterPanelComponent_Conditional_27_Template_select_ngModelChange_13_listener($event) { i0.ɵɵrestoreView(_r7); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onToolsCategoryChange($event)); });
    i0.ɵɵelementStart(14, "option", 21);
    i0.ɵɵtext(15, "All Categories");
    i0.ɵɵelementEnd();
    i0.ɵɵrepeaterCreate(16, MCPFilterPanelComponent_Conditional_27_For_17_Template, 2, 3, "option", 15, _forTrack2);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(18, "div", 9)(19, "label", 23)(20, "input", 24);
    i0.ɵɵlistener("change", function MCPFilterPanelComponent_Conditional_27_Template_input_change_20_listener($event) { i0.ɵɵrestoreView(_r7); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onFavoritesOnlyChange($event.target.checked)); });
    i0.ɵɵelementEnd();
    i0.ɵɵelement(21, "span", 25);
    i0.ɵɵtext(22, " Favorites only ");
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("ngModel", ctx_r0.filters.toolsServer ?? "all");
    i0.ɵɵadvance(3);
    i0.ɵɵrepeater(ctx_r0.availableServers);
    i0.ɵɵadvance(6);
    i0.ɵɵproperty("ngModel", ctx_r0.filters.toolsCategory ?? "all");
    i0.ɵɵadvance(3);
    i0.ɵɵrepeater(ctx_r0.availableCategories);
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("checked", ctx_r0.filters.favoritesOnly === true);
} }
export class MCPFilterPanelComponent {
    filters = {
        searchTerm: '',
        serverStatus: 'all',
        connectionStatus: 'all',
        toolStatus: 'all',
        logStatus: 'all',
        toolsServer: 'all',
        toolsCategory: 'all',
        favoritesOnly: false
    };
    activeTab = 'servers';
    totalCount = 0;
    filteredCount = 0;
    /** Part 3.3 — available servers for the Tools tab server-filter dropdown */
    availableServers = [];
    /** Part 3.3 — available categories (derived from snake_case tool-name prefix) with counts */
    availableCategories = [];
    filtersChange = new EventEmitter();
    closePanel = new EventEmitter();
    serverStatusOptions = [
        { text: 'All Statuses', value: 'all' },
        { text: 'Active', value: 'Active' },
        { text: 'Inactive', value: 'Inactive' }
    ];
    connectionStatusOptions = [
        { text: 'All Statuses', value: 'all' },
        { text: 'Active', value: 'Active' },
        { text: 'Inactive', value: 'Inactive' },
        { text: 'Error', value: 'Error' }
    ];
    toolStatusOptions = [
        { text: 'All Statuses', value: 'all' },
        { text: 'Active', value: 'Active' },
        { text: 'Deprecated', value: 'Deprecated' }
    ];
    logStatusOptions = [
        { text: 'All Statuses', value: 'all' },
        { text: 'Success', value: 'Success' },
        { text: 'Error', value: 'Error' },
        { text: 'Running', value: 'Running' }
    ];
    onFilterChange() {
        this.filtersChange.emit(this.filters);
    }
    onSearchChange(value) {
        this.filters = { ...this.filters, searchTerm: value };
        this.onFilterChange();
    }
    onServerStatusChange(value) {
        this.filters = { ...this.filters, serverStatus: value };
        this.onFilterChange();
    }
    onConnectionStatusChange(value) {
        this.filters = { ...this.filters, connectionStatus: value };
        this.onFilterChange();
    }
    onToolStatusChange(value) {
        this.filters = { ...this.filters, toolStatus: value };
        this.onFilterChange();
    }
    onLogStatusChange(value) {
        this.filters = { ...this.filters, logStatus: value };
        this.onFilterChange();
    }
    onToolsServerChange(value) {
        this.filters = { ...this.filters, toolsServer: value };
        this.onFilterChange();
    }
    onToolsCategoryChange(value) {
        this.filters = { ...this.filters, toolsCategory: value };
        this.onFilterChange();
    }
    onFavoritesOnlyChange(checked) {
        this.filters = { ...this.filters, favoritesOnly: checked };
        this.onFilterChange();
    }
    resetAllFilters() {
        this.filters = {
            searchTerm: '',
            serverStatus: 'all',
            connectionStatus: 'all',
            toolStatus: 'all',
            logStatus: 'all',
            toolsServer: 'all',
            toolsCategory: 'all',
            favoritesOnly: false
        };
        this.onFilterChange();
    }
    /** Part 3.3 — count of non-default filter dimensions, used for "Filters (N)" badge */
    get activeFilterCount() {
        let n = 0;
        if (this.filters.searchTerm)
            n++;
        if (this.filters.serverStatus && this.filters.serverStatus !== 'all')
            n++;
        if (this.filters.connectionStatus && this.filters.connectionStatus !== 'all')
            n++;
        if (this.filters.toolStatus && this.filters.toolStatus !== 'all')
            n++;
        if (this.filters.logStatus && this.filters.logStatus !== 'all')
            n++;
        if (this.filters.toolsServer && this.filters.toolsServer !== 'all')
            n++;
        if (this.filters.toolsCategory && this.filters.toolsCategory !== 'all')
            n++;
        if (this.filters.favoritesOnly)
            n++;
        return n;
    }
    toggleFilterPanel() {
        this.closePanel.emit();
    }
    get hasActiveFilters() {
        return this.filters.searchTerm !== '' ||
            this.filters.serverStatus !== 'all' ||
            this.filters.connectionStatus !== 'all' ||
            this.filters.toolStatus !== 'all' ||
            this.filters.logStatus !== 'all';
    }
    get currentStatusOptions() {
        switch (this.activeTab) {
            case 'servers':
                return this.serverStatusOptions;
            case 'connections':
                return this.connectionStatusOptions;
            case 'tools':
                return this.toolStatusOptions;
            case 'logs':
                return this.logStatusOptions;
            default:
                return this.serverStatusOptions;
        }
    }
    get currentStatusValue() {
        switch (this.activeTab) {
            case 'servers':
                return this.filters.serverStatus;
            case 'connections':
                return this.filters.connectionStatus;
            case 'tools':
                return this.filters.toolStatus;
            case 'logs':
                return this.filters.logStatus;
            default:
                return 'all';
        }
    }
    onCurrentStatusChange(value) {
        switch (this.activeTab) {
            case 'servers':
                this.onServerStatusChange(value);
                break;
            case 'connections':
                this.onConnectionStatusChange(value);
                break;
            case 'tools':
                this.onToolStatusChange(value);
                break;
            case 'logs':
                this.onLogStatusChange(value);
                break;
        }
    }
    getTabLabel() {
        switch (this.activeTab) {
            case 'servers':
                return 'Server';
            case 'connections':
                return 'Connection';
            case 'tools':
                return 'Tool';
            case 'logs':
                return 'Log';
            default:
                return 'Item';
        }
    }
    static ɵfac = function MCPFilterPanelComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MCPFilterPanelComponent)(); };
    static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MCPFilterPanelComponent, selectors: [["mj-mcp-filter-panel"]], inputs: { filters: "filters", activeTab: "activeTab", totalCount: "totalCount", filteredCount: "filteredCount", availableServers: "availableServers", availableCategories: "availableCategories" }, outputs: { filtersChange: "filtersChange", closePanel: "closePanel" }, standalone: false, decls: 32, vars: 13, consts: [[1, "filter-panel"], [1, "filter-panel-header"], [2, "margin-left", "6px", "padding", "2px 8px", "background", "var(--mj-brand-primary,#264FAF)", "color", "#fff", "border-radius", "10px", "font-size", "0.7rem", "font-weight", "600"], [1, "filter-summary-inline"], [1, "summary-value"], [1, "summary-label"], [1, "close-btn", 3, "click"], [1, "fa-solid", "fa-times"], [1, "filter-content"], [1, "filter-group"], [1, "filter-label"], [1, "fa-solid", "fa-search"], ["type", "text", 1, "filter-input", 3, "ngModelChange", "ngModel", "placeholder"], [1, "fa-solid", "fa-toggle-on"], [1, "filter-select", 3, "ngModelChange", "ngModel"], [3, "value"], [1, "filter-actions"], ["title", "Reset all filters", 1, "reset-btn", 3, "click"], [1, "fa-solid", "fa-undo"], [1, "fa-solid", "fa-server"], [1, "fa-solid", "fa-link"], ["value", "all"], [1, "fa-solid", "fa-tags"], [1, "filter-label", 2, "display", "flex", "align-items", "center", "gap", "6px", "cursor", "pointer"], ["type", "checkbox", 3, "change", "checked"], [1, "fa-solid", "fa-star"]], template: function MCPFilterPanelComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "h3");
            i0.ɵɵtext(3, "MCP Filters ");
            i0.ɵɵconditionalCreate(4, MCPFilterPanelComponent_Conditional_4_Template, 2, 1, "span", 2);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(5, "div", 3)(6, "span", 4);
            i0.ɵɵtext(7);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(8, "span", 5);
            i0.ɵɵtext(9);
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(10, "button", 6);
            i0.ɵɵlistener("click", function MCPFilterPanelComponent_Template_button_click_10_listener() { return ctx.toggleFilterPanel(); });
            i0.ɵɵelement(11, "span", 7);
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(12, "div", 8)(13, "div", 9)(14, "label", 10);
            i0.ɵɵelement(15, "span", 11);
            i0.ɵɵtext(16, " Search ");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(17, "input", 12);
            i0.ɵɵlistener("ngModelChange", function MCPFilterPanelComponent_Template_input_ngModelChange_17_listener($event) { return ctx.onSearchChange($event); });
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(18, "div", 9)(19, "label", 10);
            i0.ɵɵelement(20, "span", 13);
            i0.ɵɵtext(21);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(22, "select", 14);
            i0.ɵɵlistener("ngModelChange", function MCPFilterPanelComponent_Template_select_ngModelChange_22_listener($event) { return ctx.onCurrentStatusChange($event); });
            i0.ɵɵrepeaterCreate(23, MCPFilterPanelComponent_For_24_Template, 2, 2, "option", 15, _forTrack0);
            i0.ɵɵelementEnd()();
            i0.ɵɵconditionalCreate(25, MCPFilterPanelComponent_Conditional_25_Template, 7, 1, "div", 9);
            i0.ɵɵconditionalCreate(26, MCPFilterPanelComponent_Conditional_26_Template, 7, 1, "div", 9);
            i0.ɵɵconditionalCreate(27, MCPFilterPanelComponent_Conditional_27_Template, 23, 3);
            i0.ɵɵelementStart(28, "div", 16)(29, "button", 17);
            i0.ɵɵlistener("click", function MCPFilterPanelComponent_Template_button_click_29_listener() { return ctx.resetAllFilters(); });
            i0.ɵɵelement(30, "span", 18);
            i0.ɵɵtext(31, " Reset Filters ");
            i0.ɵɵelementEnd()()()();
        } if (rf & 2) {
            i0.ɵɵadvance(4);
            i0.ɵɵconditional(ctx.activeFilterCount > 0 ? 4 : -1);
            i0.ɵɵadvance(3);
            i0.ɵɵtextInterpolate(ctx.filteredCount);
            i0.ɵɵadvance(2);
            i0.ɵɵtextInterpolate1("of ", ctx.totalCount);
            i0.ɵɵadvance(8);
            i0.ɵɵproperty("placeholder", i0.ɵɵinterpolate1("Search ", ctx.getTabLabel().toLowerCase(), "s..."))("ngModel", ctx.filters.searchTerm);
            i0.ɵɵadvance(4);
            i0.ɵɵtextInterpolate1(" ", ctx.getTabLabel(), " Status ");
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngModel", ctx.currentStatusValue);
            i0.ɵɵadvance();
            i0.ɵɵrepeater(ctx.currentStatusOptions);
            i0.ɵɵadvance(2);
            i0.ɵɵconditional(ctx.activeTab === "connections" || ctx.activeTab === "tools" || ctx.activeTab === "logs" ? 25 : -1);
            i0.ɵɵadvance();
            i0.ɵɵconditional(ctx.activeTab === "logs" ? 26 : -1);
            i0.ɵɵadvance();
            i0.ɵɵconditional(ctx.activeTab === "tools" ? 27 : -1);
            i0.ɵɵadvance(2);
            i0.ɵɵclassProp("has-filters", ctx.hasActiveFilters);
        } }, dependencies: [i1.NgSelectOption, i1.ɵNgSelectMultipleOption, i1.DefaultValueAccessor, i1.SelectControlValueAccessor, i1.NgControlStatus, i1.NgModel], styles: ["\n\n\n.filter-panel[_ngcontent-%COMP%] {\n  height: 100%;\n  background: var(--mj-bg-surface);\n  border-right: 1px solid var(--mj-border-default);\n  display: flex;\n  flex-direction: column;\n  overflow: hidden;\n}\n\n\n\n.filter-panel-header[_ngcontent-%COMP%] {\n  padding: 20px;\n  border-bottom: 1px solid var(--mj-bg-surface-sunken);\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  flex-shrink: 0;\n  background: var(--mj-bg-surface-card);\n}\n\n.filter-panel-header[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%] {\n  margin: 0;\n  font-size: 16px;\n  font-weight: 700;\n  color: var(--mj-text-primary);\n  flex: 1;\n  letter-spacing: -0.02em;\n}\n\n.filter-panel-header[_ngcontent-%COMP%]   .filter-summary-inline[_ngcontent-%COMP%] {\n  display: flex;\n  align-items: baseline;\n  gap: 4px;\n  margin-right: 16px;\n  font-size: 13px;\n  padding: 6px 12px;\n  background: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n  border-radius: 20px;\n  border: 1px solid color-mix(in srgb, var(--mj-brand-primary) 40%, transparent);\n}\n\n.filter-panel-header[_ngcontent-%COMP%]   .filter-summary-inline[_ngcontent-%COMP%]   .summary-value[_ngcontent-%COMP%] {\n  font-weight: 700;\n  color: var(--mj-brand-primary);\n}\n\n.filter-panel-header[_ngcontent-%COMP%]   .filter-summary-inline[_ngcontent-%COMP%]   .summary-label[_ngcontent-%COMP%] {\n  color: var(--mj-brand-primary);\n  font-weight: 500;\n}\n\n.filter-panel-header[_ngcontent-%COMP%]   .close-btn[_ngcontent-%COMP%] {\n  background: transparent;\n  border: none;\n  padding: 8px;\n  cursor: pointer;\n  color: var(--mj-text-disabled);\n  border-radius: 8px;\n  transition: all 0.2s ease;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n}\n\n.filter-panel-header[_ngcontent-%COMP%]   .close-btn[_ngcontent-%COMP%]:hover {\n  background: var(--mj-bg-surface-sunken);\n  color: var(--mj-text-secondary);\n}\n\n.filter-panel-header[_ngcontent-%COMP%]   .close-btn[_ngcontent-%COMP%]   .fa-solid[_ngcontent-%COMP%] {\n  font-size: 14px;\n}\n\n\n\n.filter-content[_ngcontent-%COMP%] {\n  flex: 1;\n  overflow-y: auto;\n  overflow-x: hidden;\n  padding: 20px;\n}\n\n\n\n.filter-group[_ngcontent-%COMP%] {\n  margin-bottom: 24px;\n}\n\n.filter-group[_ngcontent-%COMP%]   .filter-label[_ngcontent-%COMP%] {\n  display: flex;\n  align-items: center;\n  gap: 10px;\n  margin-bottom: 10px;\n  font-size: 12px;\n  font-weight: 700;\n  color: var(--mj-text-muted);\n  text-transform: uppercase;\n  letter-spacing: 0.75px;\n}\n\n.filter-group[_ngcontent-%COMP%]   .filter-label[_ngcontent-%COMP%]   .fa-solid[_ngcontent-%COMP%] {\n  font-size: 13px;\n  color: var(--mj-brand-primary);\n  width: 16px;\n}\n\n.filter-group[_ngcontent-%COMP%]   .filter-input[_ngcontent-%COMP%], \n.filter-group[_ngcontent-%COMP%]   .filter-select[_ngcontent-%COMP%] {\n  width: 100%;\n  padding: 12px 14px;\n  border: 1px solid var(--mj-border-default);\n  border-radius: 10px;\n  font-size: 14px;\n  background: var(--mj-bg-surface);\n  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);\n  box-sizing: border-box;\n  color: var(--mj-text-secondary);\n}\n\n.filter-group[_ngcontent-%COMP%]   .filter-input[_ngcontent-%COMP%]:focus, \n.filter-group[_ngcontent-%COMP%]   .filter-select[_ngcontent-%COMP%]:focus {\n  outline: none;\n  border-color: var(--mj-brand-primary);\n  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 15%, transparent);\n}\n\n.filter-group[_ngcontent-%COMP%]   .filter-input[_ngcontent-%COMP%]::placeholder {\n  color: var(--mj-text-disabled);\n}\n\n.filter-group[_ngcontent-%COMP%]   .filter-select[_ngcontent-%COMP%] {\n  cursor: pointer;\n  appearance: none;\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E\");\n  background-repeat: no-repeat;\n  background-position: right 14px center;\n  padding-right: 36px;\n}\n\n\n\n.filter-actions[_ngcontent-%COMP%] {\n  margin-top: 28px;\n  padding-top: 20px;\n  border-top: 1px solid var(--mj-bg-surface-sunken);\n}\n\n.filter-actions[_ngcontent-%COMP%]   .reset-btn[_ngcontent-%COMP%] {\n  width: 100%;\n  padding: 12px 16px;\n  background: var(--mj-bg-surface-card);\n  border: 1px solid var(--mj-border-default);\n  border-radius: 10px;\n  color: var(--mj-text-muted);\n  font-size: 14px;\n  font-weight: 600;\n  cursor: pointer;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  gap: 10px;\n  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);\n  box-sizing: border-box;\n}\n\n.filter-actions[_ngcontent-%COMP%]   .reset-btn[_ngcontent-%COMP%]:hover {\n  background: var(--mj-bg-surface-sunken);\n  border-color: var(--mj-border-strong);\n  color: var(--mj-text-secondary);\n  transform: translateY(-1px);\n  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);\n}\n\n.filter-actions[_ngcontent-%COMP%]   .reset-btn.has-filters[_ngcontent-%COMP%] {\n  background: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n  border-color: color-mix(in srgb, var(--mj-brand-primary) 40%, transparent);\n  color: var(--mj-brand-primary);\n}\n\n.filter-actions[_ngcontent-%COMP%]   .reset-btn.has-filters[_ngcontent-%COMP%]:hover {\n  background: color-mix(in srgb, var(--mj-brand-primary) 25%, var(--mj-bg-surface));\n  border-color: color-mix(in srgb, var(--mj-brand-primary) 50%, transparent);\n  color: var(--mj-brand-primary);\n}\n\n.filter-actions[_ngcontent-%COMP%]   .reset-btn[_ngcontent-%COMP%]   .fa-solid[_ngcontent-%COMP%] {\n  font-size: 13px;\n}\n\n\n\n.filter-content[_ngcontent-%COMP%]::-webkit-scrollbar {\n  width: 6px;\n}\n\n.filter-content[_ngcontent-%COMP%]::-webkit-scrollbar-track {\n  background: var(--mj-bg-surface-card);\n  border-radius: 3px;\n}\n\n.filter-content[_ngcontent-%COMP%]::-webkit-scrollbar-thumb {\n  background: var(--mj-border-strong);\n  border-radius: 3px;\n}\n\n.filter-content[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover {\n  background: var(--mj-text-disabled);\n}"] });
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MCPFilterPanelComponent, [{
        type: Component,
        args: [{ standalone: false, selector: 'mj-mcp-filter-panel', template: "<div class=\"filter-panel\">\n  <div class=\"filter-panel-header\">\n    <h3>MCP Filters\n      @if (activeFilterCount > 0) {\n        <span style=\"margin-left:6px;padding:2px 8px;background:var(--mj-brand-primary,#264FAF);color:#fff;border-radius:10px;font-size:0.7rem;font-weight:600\">{{ activeFilterCount }}</span>\n      }\n    </h3>\n    <div class=\"filter-summary-inline\">\n      <span class=\"summary-value\">{{ filteredCount }}</span>\n      <span class=\"summary-label\">of {{ totalCount }}</span>\n    </div>\n    <button class=\"close-btn\" (click)=\"toggleFilterPanel()\">\n      <span class=\"fa-solid fa-times\"></span>\n    </button>\n  </div>\n\n  <div class=\"filter-content\">\n    <!-- Search Filter -->\n    <div class=\"filter-group\">\n      <label class=\"filter-label\">\n        <span class=\"fa-solid fa-search\"></span>\n        Search\n      </label>\n      <input\n        type=\"text\"\n        class=\"filter-input\"\n        [ngModel]=\"filters.searchTerm\"\n        (ngModelChange)=\"onSearchChange($event)\"\n        placeholder=\"Search {{ getTabLabel().toLowerCase() }}s...\">\n    </div>\n\n    <!-- Status Filter (context-aware based on active tab) -->\n    <div class=\"filter-group\">\n      <label class=\"filter-label\">\n        <span class=\"fa-solid fa-toggle-on\"></span>\n        {{ getTabLabel() }} Status\n      </label>\n      <select\n        class=\"filter-select\"\n        [ngModel]=\"currentStatusValue\"\n        (ngModelChange)=\"onCurrentStatusChange($event)\">\n        @for (option of currentStatusOptions; track option.value) {\n          <option [value]=\"option.value\">{{ option.text }}</option>\n        }\n      </select>\n    </div>\n\n    <!-- Additional filters visible based on context -->\n    @if (activeTab === 'connections' || activeTab === 'tools' || activeTab === 'logs') {\n      <div class=\"filter-group\">\n        <label class=\"filter-label\">\n          <span class=\"fa-solid fa-server\"></span>\n          Server Status\n        </label>\n        <select\n          class=\"filter-select\"\n          [ngModel]=\"filters.serverStatus\"\n          (ngModelChange)=\"onServerStatusChange($event)\">\n          @for (option of serverStatusOptions; track option.value) {\n            <option [value]=\"option.value\">{{ option.text }}</option>\n          }\n        </select>\n      </div>\n    }\n\n    @if (activeTab === 'logs') {\n      <div class=\"filter-group\">\n        <label class=\"filter-label\">\n          <span class=\"fa-solid fa-link\"></span>\n          Connection Status\n        </label>\n        <select\n          class=\"filter-select\"\n          [ngModel]=\"filters.connectionStatus\"\n          (ngModelChange)=\"onConnectionStatusChange($event)\">\n          @for (option of connectionStatusOptions; track option.value) {\n            <option [value]=\"option.value\">{{ option.text }}</option>\n          }\n        </select>\n      </div>\n    }\n\n    <!-- Part 3.3 \u2014 Tools tab: Server + Category filters + Favorites-only toggle -->\n    @if (activeTab === 'tools') {\n      <div class=\"filter-group\">\n        <label class=\"filter-label\"><span class=\"fa-solid fa-server\"></span> Server</label>\n        <select class=\"filter-select\" [ngModel]=\"filters.toolsServer ?? 'all'\" (ngModelChange)=\"onToolsServerChange($event)\">\n          <option value=\"all\">All Servers</option>\n          @for (s of availableServers; track s.ID) {\n            <option [value]=\"s.ID\">{{ s.Name }}</option>\n          }\n        </select>\n      </div>\n      <div class=\"filter-group\">\n        <label class=\"filter-label\"><span class=\"fa-solid fa-tags\"></span> Category</label>\n        <select class=\"filter-select\" [ngModel]=\"filters.toolsCategory ?? 'all'\" (ngModelChange)=\"onToolsCategoryChange($event)\">\n          <option value=\"all\">All Categories</option>\n          @for (c of availableCategories; track c.category) {\n            <option [value]=\"c.category\">{{ c.category }} ({{ c.count }})</option>\n          }\n        </select>\n      </div>\n      <div class=\"filter-group\">\n        <label class=\"filter-label\" style=\"display:flex;align-items:center;gap:6px;cursor:pointer\">\n          <input type=\"checkbox\" [checked]=\"filters.favoritesOnly === true\" (change)=\"onFavoritesOnlyChange($any($event.target).checked)\" />\n          <span class=\"fa-solid fa-star\"></span>\n          Favorites only\n        </label>\n      </div>\n    }\n\n    <!-- Reset Button -->\n    <div class=\"filter-actions\">\n      <button\n        class=\"reset-btn\"\n        (click)=\"resetAllFilters()\"\n        title=\"Reset all filters\"\n        [class.has-filters]=\"hasActiveFilters\">\n        <span class=\"fa-solid fa-undo\"></span>\n        Reset Filters\n      </button>\n    </div>\n  </div>\n</div>\n", styles: ["/* MCP Filter Panel - Matching Agent Filter Panel Design */\n\n.filter-panel {\n  height: 100%;\n  background: var(--mj-bg-surface);\n  border-right: 1px solid var(--mj-border-default);\n  display: flex;\n  flex-direction: column;\n  overflow: hidden;\n}\n\n/* Header */\n.filter-panel-header {\n  padding: 20px;\n  border-bottom: 1px solid var(--mj-bg-surface-sunken);\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  flex-shrink: 0;\n  background: var(--mj-bg-surface-card);\n}\n\n.filter-panel-header h3 {\n  margin: 0;\n  font-size: 16px;\n  font-weight: 700;\n  color: var(--mj-text-primary);\n  flex: 1;\n  letter-spacing: -0.02em;\n}\n\n.filter-panel-header .filter-summary-inline {\n  display: flex;\n  align-items: baseline;\n  gap: 4px;\n  margin-right: 16px;\n  font-size: 13px;\n  padding: 6px 12px;\n  background: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n  border-radius: 20px;\n  border: 1px solid color-mix(in srgb, var(--mj-brand-primary) 40%, transparent);\n}\n\n.filter-panel-header .filter-summary-inline .summary-value {\n  font-weight: 700;\n  color: var(--mj-brand-primary);\n}\n\n.filter-panel-header .filter-summary-inline .summary-label {\n  color: var(--mj-brand-primary);\n  font-weight: 500;\n}\n\n.filter-panel-header .close-btn {\n  background: transparent;\n  border: none;\n  padding: 8px;\n  cursor: pointer;\n  color: var(--mj-text-disabled);\n  border-radius: 8px;\n  transition: all 0.2s ease;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n}\n\n.filter-panel-header .close-btn:hover {\n  background: var(--mj-bg-surface-sunken);\n  color: var(--mj-text-secondary);\n}\n\n.filter-panel-header .close-btn .fa-solid {\n  font-size: 14px;\n}\n\n/* Content Area */\n.filter-content {\n  flex: 1;\n  overflow-y: auto;\n  overflow-x: hidden;\n  padding: 20px;\n}\n\n/* Filter Groups */\n.filter-group {\n  margin-bottom: 24px;\n}\n\n.filter-group .filter-label {\n  display: flex;\n  align-items: center;\n  gap: 10px;\n  margin-bottom: 10px;\n  font-size: 12px;\n  font-weight: 700;\n  color: var(--mj-text-muted);\n  text-transform: uppercase;\n  letter-spacing: 0.75px;\n}\n\n.filter-group .filter-label .fa-solid {\n  font-size: 13px;\n  color: var(--mj-brand-primary);\n  width: 16px;\n}\n\n.filter-group .filter-input,\n.filter-group .filter-select {\n  width: 100%;\n  padding: 12px 14px;\n  border: 1px solid var(--mj-border-default);\n  border-radius: 10px;\n  font-size: 14px;\n  background: var(--mj-bg-surface);\n  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);\n  box-sizing: border-box;\n  color: var(--mj-text-secondary);\n}\n\n.filter-group .filter-input:focus,\n.filter-group .filter-select:focus {\n  outline: none;\n  border-color: var(--mj-brand-primary);\n  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 15%, transparent);\n}\n\n.filter-group .filter-input::placeholder {\n  color: var(--mj-text-disabled);\n}\n\n.filter-group .filter-select {\n  cursor: pointer;\n  appearance: none;\n  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E\");\n  background-repeat: no-repeat;\n  background-position: right 14px center;\n  padding-right: 36px;\n}\n\n/* Filter Actions */\n.filter-actions {\n  margin-top: 28px;\n  padding-top: 20px;\n  border-top: 1px solid var(--mj-bg-surface-sunken);\n}\n\n.filter-actions .reset-btn {\n  width: 100%;\n  padding: 12px 16px;\n  background: var(--mj-bg-surface-card);\n  border: 1px solid var(--mj-border-default);\n  border-radius: 10px;\n  color: var(--mj-text-muted);\n  font-size: 14px;\n  font-weight: 600;\n  cursor: pointer;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  gap: 10px;\n  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);\n  box-sizing: border-box;\n}\n\n.filter-actions .reset-btn:hover {\n  background: var(--mj-bg-surface-sunken);\n  border-color: var(--mj-border-strong);\n  color: var(--mj-text-secondary);\n  transform: translateY(-1px);\n  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);\n}\n\n.filter-actions .reset-btn.has-filters {\n  background: color-mix(in srgb, var(--mj-brand-primary) 15%, var(--mj-bg-surface));\n  border-color: color-mix(in srgb, var(--mj-brand-primary) 40%, transparent);\n  color: var(--mj-brand-primary);\n}\n\n.filter-actions .reset-btn.has-filters:hover {\n  background: color-mix(in srgb, var(--mj-brand-primary) 25%, var(--mj-bg-surface));\n  border-color: color-mix(in srgb, var(--mj-brand-primary) 50%, transparent);\n  color: var(--mj-brand-primary);\n}\n\n.filter-actions .reset-btn .fa-solid {\n  font-size: 13px;\n}\n\n/* Scrollbar Styling */\n.filter-content::-webkit-scrollbar {\n  width: 6px;\n}\n\n.filter-content::-webkit-scrollbar-track {\n  background: var(--mj-bg-surface-card);\n  border-radius: 3px;\n}\n\n.filter-content::-webkit-scrollbar-thumb {\n  background: var(--mj-border-strong);\n  border-radius: 3px;\n}\n\n.filter-content::-webkit-scrollbar-thumb:hover {\n  background: var(--mj-text-disabled);\n}\n"] }]
    }], null, { filters: [{
            type: Input
        }], activeTab: [{
            type: Input
        }], totalCount: [{
            type: Input
        }], filteredCount: [{
            type: Input
        }], availableServers: [{
            type: Input
        }], availableCategories: [{
            type: Input
        }], filtersChange: [{
            type: Output
        }], closePanel: [{
            type: Output
        }] }); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MCPFilterPanelComponent, { className: "MCPFilterPanelComponent", filePath: "src/MCP/mcp-filter-panel.component.ts", lineNumber: 19 }); })();
//# sourceMappingURL=mcp-filter-panel.component.js.map