import { Component, Input, Output, EventEmitter } from '@angular/core';
import { AIEngineBase } from '@memberjunction/ai-engine-base';
import * as i0 from "@angular/core";
import * as i1 from "@angular/forms";
import * as i2 from "@memberjunction/ng-trees";
const _forTrack0 = ($index, $item) => $item.value;
function AgentFilterPanelComponent_For_28_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "option", 16);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const option_r1 = ctx.$implicit;
    i0.ɵɵproperty("value", option_r1.value);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(option_r1.text);
} }
function AgentFilterPanelComponent_For_35_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "option", 16);
    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 AgentFilterPanelComponent_For_42_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "option", 16);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const option_r3 = ctx.$implicit;
    i0.ɵɵproperty("value", option_r3.value);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(option_r3.text);
} }
function AgentFilterPanelComponent_For_49_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "option", 16);
    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 AgentFilterPanelComponent_For_56_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "option", 16);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const option_r5 = ctx.$implicit;
    i0.ɵɵproperty("value", option_r5.value);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(option_r5.text);
} }
export class AgentFilterPanelComponent {
    agents = [];
    filteredAgents = [];
    filters = {
        searchTerm: '',
        agentType: 'all',
        parentAgent: 'all',
        status: 'all',
        executionMode: 'all',
        exposeAsAction: 'all',
        categoryId: 'all'
    };
    filtersChange = new EventEmitter();
    filterChange = new EventEmitter();
    resetFilters = new EventEmitter();
    closePanel = new EventEmitter();
    agentTypeOptions = [
        { text: 'All Types', value: 'all' }
    ];
    parentAgentOptions = [
        { text: 'All Agents', value: 'all' },
        { text: 'No Parent', value: 'none' }
    ];
    statusOptions = [
        { text: 'All Statuses', value: 'all' },
        { text: 'Active', value: 'active' },
        { text: 'Inactive', value: 'inactive' }
    ];
    executionModeOptions = [
        { text: 'All Execution Modes', value: 'all' },
        { text: 'Sequential', value: 'Sequential' },
        { text: 'Parallel', value: 'Parallel' }
    ];
    exposeAsActionOptions = [
        { text: 'All Agents', value: 'all' },
        { text: 'Exposed as Action', value: 'true' },
        { text: 'Not Exposed', value: 'false' }
    ];
    /** TreeDropdown configuration for agent categories */
    CategoryBranchConfig = {
        EntityName: 'MJ: AI Agent Categories',
        DisplayField: 'Name',
        ParentIDField: 'ParentID',
        DefaultIcon: 'fa-solid fa-folder',
        OrderBy: 'Name ASC',
        DescriptionField: 'Description'
    };
    /** Current category selection for the tree dropdown */
    SelectedCategoryKey = null;
    async ngOnInit() {
        // Load agent types from AIEngineBase
        try {
            const aiEngine = AIEngineBase.Instance;
            if (!aiEngine.Loaded) {
                await aiEngine.Config();
            }
            // Add agent types to options
            const agentTypes = aiEngine.AgentTypes;
            agentTypes.forEach((type) => {
                this.agentTypeOptions.push({
                    text: type.Name,
                    value: type.ID
                });
            });
            // Add parent agents to options (only those without parents themselves)
            const parentAgents = this.agents.filter(agent => !agent.ParentID);
            parentAgents.forEach(agent => {
                this.parentAgentOptions.push({
                    text: agent.Name || 'Unnamed Agent',
                    value: agent.ID
                });
            });
        }
        catch (error) {
            console.error('Error loading agent metadata:', error);
        }
    }
    onFilterChange() {
        this.filtersChange.emit(this.filters);
        this.filterChange.emit();
    }
    onCategoryChange(value) {
        if (value && !Array.isArray(value)) {
            const idValue = value.KeyValuePairs?.find(kv => kv.FieldName === 'ID')?.Value;
            this.filters.categoryId = idValue ?? 'all';
        }
        else {
            this.filters.categoryId = 'all';
        }
        this.SelectedCategoryKey = Array.isArray(value) ? null : value;
        this.onFilterChange();
    }
    resetAllFilters() {
        this.resetFilters.emit();
    }
    toggleFilterPanel() {
        this.closePanel.emit();
    }
    static ɵfac = function AgentFilterPanelComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AgentFilterPanelComponent)(); };
    static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AgentFilterPanelComponent, selectors: [["mj-agent-filter-panel"]], inputs: { agents: "agents", filteredAgents: "filteredAgents", filters: "filters" }, outputs: { filtersChange: "filtersChange", filterChange: "filterChange", resetFilters: "resetFilters", closePanel: "closePanel" }, standalone: false, decls: 61, vars: 12, consts: [[1, "filter-panel"], [1, "filter-panel-header"], [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", "placeholder", "Search agents...", 1, "filter-input", 3, "ngModelChange", "input", "ngModel"], [1, "fa-solid", "fa-folder-tree"], ["SelectionMode", "single", "SelectableTypes", "branch", "Placeholder", "All Categories", 3, "ValueChange", "BranchConfig", "Value", "Clearable", "EnableSearch"], [1, "fa-solid", "fa-robot"], [1, "filter-select", 3, "ngModelChange", "ngModel"], [3, "value"], [1, "fa-solid", "fa-sitemap"], [1, "fa-solid", "fa-toggle-on"], [1, "fa-solid", "fa-list-ol"], [1, "fa-solid", "fa-share"], [1, "filter-actions"], ["title", "Reset all filters", 1, "reset-btn", 3, "click"], [1, "fa-solid", "fa-undo"]], template: function AgentFilterPanelComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "h3");
            i0.ɵɵtext(3, "Agent Filters");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(4, "div", 2)(5, "span", 3);
            i0.ɵɵtext(6);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(7, "span", 4);
            i0.ɵɵtext(8);
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(9, "button", 5);
            i0.ɵɵlistener("click", function AgentFilterPanelComponent_Template_button_click_9_listener() { return ctx.toggleFilterPanel(); });
            i0.ɵɵelement(10, "span", 6);
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(11, "div", 7)(12, "div", 8)(13, "label", 9);
            i0.ɵɵelement(14, "span", 10);
            i0.ɵɵtext(15, " Name ");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(16, "input", 11);
            i0.ɵɵtwoWayListener("ngModelChange", function AgentFilterPanelComponent_Template_input_ngModelChange_16_listener($event) { i0.ɵɵtwoWayBindingSet(ctx.filters.searchTerm, $event) || (ctx.filters.searchTerm = $event); return $event; });
            i0.ɵɵlistener("ngModelChange", function AgentFilterPanelComponent_Template_input_ngModelChange_16_listener() { return ctx.onFilterChange(); })("input", function AgentFilterPanelComponent_Template_input_input_16_listener() { return ctx.onFilterChange(); });
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(17, "div", 8)(18, "label", 9);
            i0.ɵɵelement(19, "span", 12);
            i0.ɵɵtext(20, " Category ");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(21, "mj-tree-dropdown", 13);
            i0.ɵɵlistener("ValueChange", function AgentFilterPanelComponent_Template_mj_tree_dropdown_ValueChange_21_listener($event) { return ctx.onCategoryChange($event); });
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(22, "div", 8)(23, "label", 9);
            i0.ɵɵelement(24, "span", 14);
            i0.ɵɵtext(25, " Type ");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(26, "select", 15);
            i0.ɵɵtwoWayListener("ngModelChange", function AgentFilterPanelComponent_Template_select_ngModelChange_26_listener($event) { i0.ɵɵtwoWayBindingSet(ctx.filters.agentType, $event) || (ctx.filters.agentType = $event); return $event; });
            i0.ɵɵlistener("ngModelChange", function AgentFilterPanelComponent_Template_select_ngModelChange_26_listener() { return ctx.onFilterChange(); });
            i0.ɵɵrepeaterCreate(27, AgentFilterPanelComponent_For_28_Template, 2, 2, "option", 16, _forTrack0);
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(29, "div", 8)(30, "label", 9);
            i0.ɵɵelement(31, "span", 17);
            i0.ɵɵtext(32, " Parent ");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(33, "select", 15);
            i0.ɵɵtwoWayListener("ngModelChange", function AgentFilterPanelComponent_Template_select_ngModelChange_33_listener($event) { i0.ɵɵtwoWayBindingSet(ctx.filters.parentAgent, $event) || (ctx.filters.parentAgent = $event); return $event; });
            i0.ɵɵlistener("ngModelChange", function AgentFilterPanelComponent_Template_select_ngModelChange_33_listener() { return ctx.onFilterChange(); });
            i0.ɵɵrepeaterCreate(34, AgentFilterPanelComponent_For_35_Template, 2, 2, "option", 16, _forTrack0);
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(36, "div", 8)(37, "label", 9);
            i0.ɵɵelement(38, "span", 18);
            i0.ɵɵtext(39, " Status ");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(40, "select", 15);
            i0.ɵɵtwoWayListener("ngModelChange", function AgentFilterPanelComponent_Template_select_ngModelChange_40_listener($event) { i0.ɵɵtwoWayBindingSet(ctx.filters.status, $event) || (ctx.filters.status = $event); return $event; });
            i0.ɵɵlistener("ngModelChange", function AgentFilterPanelComponent_Template_select_ngModelChange_40_listener() { return ctx.onFilterChange(); });
            i0.ɵɵrepeaterCreate(41, AgentFilterPanelComponent_For_42_Template, 2, 2, "option", 16, _forTrack0);
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(43, "div", 8)(44, "label", 9);
            i0.ɵɵelement(45, "span", 19);
            i0.ɵɵtext(46, " Execution Mode ");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(47, "select", 15);
            i0.ɵɵtwoWayListener("ngModelChange", function AgentFilterPanelComponent_Template_select_ngModelChange_47_listener($event) { i0.ɵɵtwoWayBindingSet(ctx.filters.executionMode, $event) || (ctx.filters.executionMode = $event); return $event; });
            i0.ɵɵlistener("ngModelChange", function AgentFilterPanelComponent_Template_select_ngModelChange_47_listener() { return ctx.onFilterChange(); });
            i0.ɵɵrepeaterCreate(48, AgentFilterPanelComponent_For_49_Template, 2, 2, "option", 16, _forTrack0);
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(50, "div", 8)(51, "label", 9);
            i0.ɵɵelement(52, "span", 20);
            i0.ɵɵtext(53, " Action Exposure ");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(54, "select", 15);
            i0.ɵɵtwoWayListener("ngModelChange", function AgentFilterPanelComponent_Template_select_ngModelChange_54_listener($event) { i0.ɵɵtwoWayBindingSet(ctx.filters.exposeAsAction, $event) || (ctx.filters.exposeAsAction = $event); return $event; });
            i0.ɵɵlistener("ngModelChange", function AgentFilterPanelComponent_Template_select_ngModelChange_54_listener() { return ctx.onFilterChange(); });
            i0.ɵɵrepeaterCreate(55, AgentFilterPanelComponent_For_56_Template, 2, 2, "option", 16, _forTrack0);
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(57, "div", 21)(58, "button", 22);
            i0.ɵɵlistener("click", function AgentFilterPanelComponent_Template_button_click_58_listener() { return ctx.resetAllFilters(); });
            i0.ɵɵelement(59, "span", 23);
            i0.ɵɵtext(60, " Reset Filters ");
            i0.ɵɵelementEnd()()()();
        } if (rf & 2) {
            i0.ɵɵadvance(6);
            i0.ɵɵtextInterpolate(ctx.filteredAgents.length);
            i0.ɵɵadvance(2);
            i0.ɵɵtextInterpolate1("of ", ctx.agents.length);
            i0.ɵɵadvance(8);
            i0.ɵɵtwoWayProperty("ngModel", ctx.filters.searchTerm);
            i0.ɵɵadvance(5);
            i0.ɵɵproperty("BranchConfig", ctx.CategoryBranchConfig)("Value", ctx.SelectedCategoryKey)("Clearable", true)("EnableSearch", true);
            i0.ɵɵadvance(5);
            i0.ɵɵtwoWayProperty("ngModel", ctx.filters.agentType);
            i0.ɵɵadvance();
            i0.ɵɵrepeater(ctx.agentTypeOptions);
            i0.ɵɵadvance(6);
            i0.ɵɵtwoWayProperty("ngModel", ctx.filters.parentAgent);
            i0.ɵɵadvance();
            i0.ɵɵrepeater(ctx.parentAgentOptions);
            i0.ɵɵadvance(6);
            i0.ɵɵtwoWayProperty("ngModel", ctx.filters.status);
            i0.ɵɵadvance();
            i0.ɵɵrepeater(ctx.statusOptions);
            i0.ɵɵadvance(6);
            i0.ɵɵtwoWayProperty("ngModel", ctx.filters.executionMode);
            i0.ɵɵadvance();
            i0.ɵɵrepeater(ctx.executionModeOptions);
            i0.ɵɵadvance(6);
            i0.ɵɵtwoWayProperty("ngModel", ctx.filters.exposeAsAction);
            i0.ɵɵadvance();
            i0.ɵɵrepeater(ctx.exposeAsActionOptions);
        } }, dependencies: [i1.NgSelectOption, i1.ɵNgSelectMultipleOption, i1.DefaultValueAccessor, i1.SelectControlValueAccessor, i1.NgControlStatus, i1.NgModel, i2.TreeDropdownComponent], 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) 12%, var(--mj-bg-surface));\n  border-radius: 20px;\n  border: 1px solid color-mix(in srgb, var(--mj-brand-primary) 30%, var(--mj-bg-surface));\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-hover);\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[_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(AgentFilterPanelComponent, [{
        type: Component,
        args: [{ standalone: false, selector: 'mj-agent-filter-panel', template: "<div class=\"filter-panel\">\n  <div class=\"filter-panel-header\">\n    <h3>Agent Filters</h3>\n    <div class=\"filter-summary-inline\">\n      <span class=\"summary-value\">{{ filteredAgents.length }}</span>\n      <span class=\"summary-label\">of {{ agents.length }}</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        Name\n      </label>\n      <input \n        type=\"text\"\n        class=\"filter-input\"\n        [(ngModel)]=\"filters.searchTerm\"\n        (ngModelChange)=\"onFilterChange()\"\n        (input)=\"onFilterChange()\"\n        placeholder=\"Search agents...\">\n    </div>\n    \n    <!-- Category Filter (TreeDropdown) -->\n    <div class=\"filter-group\">\n      <label class=\"filter-label\">\n        <span class=\"fa-solid fa-folder-tree\"></span>\n        Category\n      </label>\n      <mj-tree-dropdown\n        [BranchConfig]=\"CategoryBranchConfig\"\n        [Value]=\"SelectedCategoryKey\"\n        SelectionMode=\"single\"\n        SelectableTypes=\"branch\"\n        Placeholder=\"All Categories\"\n        [Clearable]=\"true\"\n        [EnableSearch]=\"true\"\n        (ValueChange)=\"onCategoryChange($event)\">\n      </mj-tree-dropdown>\n    </div>\n\n    <!-- Agent Type Filter -->\n    <div class=\"filter-group\">\n      <label class=\"filter-label\">\n        <span class=\"fa-solid fa-robot\"></span>\n        Type\n      </label>\n      <select \n        class=\"filter-select\"\n        [(ngModel)]=\"filters.agentType\"\n        (ngModelChange)=\"onFilterChange()\">\n        @for (option of agentTypeOptions; track option.value) {\n          <option [value]=\"option.value\">{{ option.text }}</option>\n        }\n      </select>\n    </div>\n    \n    <!-- Parent Agent Filter -->\n    <div class=\"filter-group\">\n      <label class=\"filter-label\">\n        <span class=\"fa-solid fa-sitemap\"></span>\n        Parent\n      </label>\n      <select \n        class=\"filter-select\"\n        [(ngModel)]=\"filters.parentAgent\"\n        (ngModelChange)=\"onFilterChange()\">\n        @for (option of parentAgentOptions; track option.value) {\n          <option [value]=\"option.value\">{{ option.text }}</option>\n        }\n      </select>\n    </div>\n    \n    <!-- Status Filter -->\n    <div class=\"filter-group\">\n      <label class=\"filter-label\">\n        <span class=\"fa-solid fa-toggle-on\"></span>\n        Status\n      </label>\n      <select \n        class=\"filter-select\"\n        [(ngModel)]=\"filters.status\"\n        (ngModelChange)=\"onFilterChange()\">\n        @for (option of statusOptions; track option.value) {\n          <option [value]=\"option.value\">{{ option.text }}</option>\n        }\n      </select>\n    </div>\n    \n    <!-- Execution Mode Filter -->\n    <div class=\"filter-group\">\n      <label class=\"filter-label\">\n        <span class=\"fa-solid fa-list-ol\"></span>\n        Execution Mode\n      </label>\n      <select \n        class=\"filter-select\"\n        [(ngModel)]=\"filters.executionMode\"\n        (ngModelChange)=\"onFilterChange()\">\n        @for (option of executionModeOptions; track option.value) {\n          <option [value]=\"option.value\">{{ option.text }}</option>\n        }\n      </select>\n    </div>\n    \n    <!-- Expose As Action Filter -->\n    <div class=\"filter-group\">\n      <label class=\"filter-label\">\n        <span class=\"fa-solid fa-share\"></span>\n        Action Exposure\n      </label>\n      <select \n        class=\"filter-select\"\n        [(ngModel)]=\"filters.exposeAsAction\"\n        (ngModelChange)=\"onFilterChange()\">\n        @for (option of exposeAsActionOptions; track option.value) {\n          <option [value]=\"option.value\">{{ option.text }}</option>\n        }\n      </select>\n    </div>\n    \n    <!-- Reset Button -->\n    <div class=\"filter-actions\">\n      <button class=\"reset-btn\" (click)=\"resetAllFilters()\" title=\"Reset all filters\">\n        <span class=\"fa-solid fa-undo\"></span>\n        Reset Filters\n      </button>\n    </div>\n  </div>\n</div>", styles: ["/* Agent Filter Panel - World-Class 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) 12%, var(--mj-bg-surface));\n  border-radius: 20px;\n  border: 1px solid color-mix(in srgb, var(--mj-brand-primary) 30%, var(--mj-bg-surface));\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-hover);\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 .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, { agents: [{
            type: Input
        }], filteredAgents: [{
            type: Input
        }], filters: [{
            type: Input
        }], filtersChange: [{
            type: Output
        }], filterChange: [{
            type: Output
        }], resetFilters: [{
            type: Output
        }], closePanel: [{
            type: Output
        }] }); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AgentFilterPanelComponent, { className: "AgentFilterPanelComponent", filePath: "src/AI/components/agents/agent-filter-panel.component.ts", lineNumber: 24 }); })();
//# sourceMappingURL=agent-filter-panel.component.js.map