import { Component, Output, EventEmitter } from '@angular/core';
import { FormControl } from '@angular/forms';
import { Subject, BehaviorSubject, combineLatest, debounceTime, distinctUntilChanged, takeUntil, startWith } from 'rxjs';
import { RunView } from '@memberjunction/core';
import { UUIDsEqual } from '@memberjunction/global';
import * as i0 from "@angular/core";
import * as i1 from "@angular/forms";
import * as i2 from "@memberjunction/ng-ui-components";
import * as i3 from "@angular/common";
const _forTrack0 = ($index, $item) => $item.id;
const _forTrack1 = ($index, $item) => $item.ID;
function AddActionDialogComponent_For_24_Template(rf, ctx) { if (rf & 1) {
    const _r1 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 28);
    i0.ɵɵpipe(1, "async");
    i0.ɵɵlistener("click", function AddActionDialogComponent_For_24_Template_div_click_0_listener() { const category_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.selectCategory(category_r2.id)); });
    i0.ɵɵelement(2, "i");
    i0.ɵɵelementStart(3, "span", 29);
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "span", 30);
    i0.ɵɵtext(6);
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const category_r2 = ctx.$implicit;
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵclassProp("selected", i0.ɵɵpipeBind1(1, 7, ctx_r2.selectedCategoryId$) === category_r2.id);
    i0.ɵɵadvance(2);
    i0.ɵɵclassMap(i0.ɵɵinterpolate1("fa-solid ", category_r2.icon, " category-icon"));
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(category_r2.name);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(category_r2.count);
} }
function AddActionDialogComponent_Conditional_27_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 19)(1, "div", 31);
    i0.ɵɵelement(2, "i", 32);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "p");
    i0.ɵɵtext(4, "Loading actions...");
    i0.ɵɵelementEnd()();
} }
function AddActionDialogComponent_Conditional_29_Template(rf, ctx) { if (rf & 1) {
    const _r4 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 20);
    i0.ɵɵelement(1, "i", 33);
    i0.ɵɵelementStart(2, "h3");
    i0.ɵɵtext(3, "No actions found");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "p");
    i0.ɵɵtext(5, "Try adjusting your search criteria or selecting a different category");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(6, "button", 34);
    i0.ɵɵlistener("click", function AddActionDialogComponent_Conditional_29_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.clearSearch()); });
    i0.ɵɵtext(7, "Clear Search");
    i0.ɵɵelementEnd()();
} }
function AddActionDialogComponent_Conditional_31_For_2_Conditional_11_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 43);
    i0.ɵɵelement(1, "i", 46);
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const action_r6 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", action_r6.categoryName, " ");
} }
function AddActionDialogComponent_Conditional_31_For_2_Conditional_12_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 44);
    i0.ɵɵelement(1, "i", 47);
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const action_r6 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", action_r6.Type, " ");
} }
function AddActionDialogComponent_Conditional_31_For_2_Conditional_13_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 45);
    i0.ɵɵelement(1, "i", 48);
    i0.ɵɵelementStart(2, "span");
    i0.ɵɵtext(3, "Already Added");
    i0.ɵɵelementEnd()();
} }
function AddActionDialogComponent_Conditional_31_For_2_Template(rf, ctx) { if (rf & 1) {
    const _r5 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 36);
    i0.ɵɵlistener("click", function AddActionDialogComponent_Conditional_31_For_2_Template_div_click_0_listener() { const action_r6 = i0.ɵɵrestoreView(_r5).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.toggleActionSelection(action_r6)); });
    i0.ɵɵelementStart(1, "div", 37);
    i0.ɵɵelement(2, "i", 8);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "div", 38)(4, "div", 39);
    i0.ɵɵelement(5, "i");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(6, "h3", 40);
    i0.ɵɵtext(7);
    i0.ɵɵelementEnd()();
    i0.ɵɵelementStart(8, "div", 41)(9, "p", 42);
    i0.ɵɵtext(10);
    i0.ɵɵelementEnd();
    i0.ɵɵconditionalCreate(11, AddActionDialogComponent_Conditional_31_For_2_Conditional_11_Template, 3, 1, "div", 43);
    i0.ɵɵconditionalCreate(12, AddActionDialogComponent_Conditional_31_For_2_Conditional_12_Template, 3, 1, "div", 44);
    i0.ɵɵelementEnd();
    i0.ɵɵconditionalCreate(13, AddActionDialogComponent_Conditional_31_For_2_Conditional_13_Template, 4, 0, "div", 45);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const action_r6 = ctx.$implicit;
    const ctx_r2 = i0.ɵɵnextContext(2);
    i0.ɵɵclassProp("selected", action_r6.selected)("existing", ctx_r2.existingActionIds.includes(action_r6.ID));
    i0.ɵɵadvance(2);
    i0.ɵɵclassProp("fa-check-circle", action_r6.selected)("fa-circle", !action_r6.selected);
    i0.ɵɵadvance(3);
    i0.ɵɵclassMap(i0.ɵɵinterpolate1("fa-solid ", ctx_r2.getActionIcon(action_r6)));
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(action_r6.Name);
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(action_r6.Description || "No description available");
    i0.ɵɵadvance();
    i0.ɵɵconditional(action_r6.categoryName ? 11 : -1);
    i0.ɵɵadvance();
    i0.ɵɵconditional(action_r6.Type ? 12 : -1);
    i0.ɵɵadvance();
    i0.ɵɵconditional(ctx_r2.existingActionIds.includes(action_r6.ID) ? 13 : -1);
} }
function AddActionDialogComponent_Conditional_31_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 21);
    i0.ɵɵrepeaterCreate(1, AddActionDialogComponent_Conditional_31_For_2_Template, 14, 16, "div", 35, _forTrack1);
    i0.ɵɵpipe(3, "async");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵrepeater(i0.ɵɵpipeBind1(3, 0, ctx_r2.filteredActions$));
} }
function AddActionDialogComponent_Conditional_34_For_14_Conditional_13_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 58);
    i0.ɵɵelement(1, "i", 48);
    i0.ɵɵtext(2, " Added ");
    i0.ɵɵelementEnd();
} }
function AddActionDialogComponent_Conditional_34_For_14_Conditional_14_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 59);
    i0.ɵɵelement(1, "i", 27);
    i0.ɵɵtext(2, " Available ");
    i0.ɵɵelementEnd();
} }
function AddActionDialogComponent_Conditional_34_For_14_Template(rf, ctx) { if (rf & 1) {
    const _r7 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 57);
    i0.ɵɵlistener("click", function AddActionDialogComponent_Conditional_34_For_14_Template_div_click_0_listener() { const action_r8 = i0.ɵɵrestoreView(_r7).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.toggleActionSelection(action_r8)); });
    i0.ɵɵelementStart(1, "span", 50);
    i0.ɵɵelement(2, "i", 8);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "span", 51);
    i0.ɵɵelement(4, "i");
    i0.ɵɵtext(5);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(6, "span", 52);
    i0.ɵɵtext(7);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(8, "span", 53);
    i0.ɵɵtext(9);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(10, "span", 54);
    i0.ɵɵtext(11);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(12, "span", 55);
    i0.ɵɵconditionalCreate(13, AddActionDialogComponent_Conditional_34_For_14_Conditional_13_Template, 3, 0, "span", 58)(14, AddActionDialogComponent_Conditional_34_For_14_Conditional_14_Template, 3, 0, "span", 59);
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const action_r8 = ctx.$implicit;
    const ctx_r2 = i0.ɵɵnextContext(2);
    i0.ɵɵclassProp("selected", action_r8.selected)("existing", ctx_r2.existingActionIds.includes(action_r8.ID));
    i0.ɵɵadvance(2);
    i0.ɵɵclassProp("fa-check-circle", action_r8.selected)("fa-circle", !action_r8.selected);
    i0.ɵɵadvance(2);
    i0.ɵɵclassMap(i0.ɵɵinterpolate1("fa-solid ", ctx_r2.getActionIcon(action_r8), " action-icon"));
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate1(" ", action_r8.Name, " ");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(action_r8.categoryName || "-");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(action_r8.Type || "-");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(action_r8.Description || "-");
    i0.ɵɵadvance(2);
    i0.ɵɵconditional(ctx_r2.existingActionIds.includes(action_r8.ID) ? 13 : 14);
} }
function AddActionDialogComponent_Conditional_34_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 22)(1, "div", 49);
    i0.ɵɵelement(2, "span", 50);
    i0.ɵɵelementStart(3, "span", 51);
    i0.ɵɵtext(4, "Name");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "span", 52);
    i0.ɵɵtext(6, "Category");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(7, "span", 53);
    i0.ɵɵtext(8, "Type");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(9, "span", 54);
    i0.ɵɵtext(10, "Description");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(11, "span", 55);
    i0.ɵɵtext(12, "Status");
    i0.ɵɵelementEnd()();
    i0.ɵɵrepeaterCreate(13, AddActionDialogComponent_Conditional_34_For_14_Template, 15, 16, "div", 56, _forTrack1);
    i0.ɵɵpipe(15, "async");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵadvance(13);
    i0.ɵɵrepeater(i0.ɵɵpipeBind1(15, 0, ctx_r2.filteredActions$));
} }
function AddActionDialogComponent_Conditional_37_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 23)(1, "div", 60);
    i0.ɵɵelement(2, "i", 61);
    i0.ɵɵelementStart(3, "span");
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd()()();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate2("", ctx_r2.selectedCount, " action", ctx_r2.selectedCount === 1 ? "" : "s", " selected");
} }
/**
 * Modern, clean dialog for selecting actions to add to an AI Agent.
 * Features searchable action list, category filtering, and multi-select capability.
 */
export class AddActionDialogComponent {
    // Computed values
    get selectedCount() {
        return this.selectedActions$.value.size;
    }
    get totalActionCount() {
        return this.allActions$.value.length;
    }
    get filteredCount() {
        return this.filteredActions$.value.length;
    }
    constructor(cdr) {
        this.cdr = cdr;
        // Input properties set by service
        this.agentId = '';
        this.agentName = '';
        this.existingActionIds = [];
        // Reactive state management
        this.destroy$ = new Subject();
        this.result = new Subject();
        // Data streams
        this.allActions$ = new BehaviorSubject([]);
        this.categories$ = new BehaviorSubject([]);
        this.filteredActions$ = new BehaviorSubject([]);
        this.categoryTree$ = new BehaviorSubject([]);
        this.selectedActions$ = new BehaviorSubject(new Set());
        this.isLoading$ = new BehaviorSubject(false);
        // UI state
        this.searchControl = new FormControl('');
        this.selectedCategoryId$ = new BehaviorSubject('all');
        this.viewMode$ = new BehaviorSubject('grid');
        this.expandedCategories = new Set();
        this.DialogClose = new EventEmitter();
    }
    ngOnInit() {
        this.initializeData();
        this.setupFiltering();
        this.preselectExistingActions();
    }
    ngOnDestroy() {
        this.destroy$.next();
        this.destroy$.complete();
    }
    async initializeData() {
        this.isLoading$.next(true);
        try {
            await this.loadActionsAndCategories();
            this.buildCategoryTree();
        }
        catch (error) {
            console.error('Error loading dialog data:', error);
        }
        finally {
            this.isLoading$.next(false);
        }
    }
    async loadActionsAndCategories() {
        const rv = new RunView();
        const [actionsResult, categoriesResult] = await rv.RunViews([
            {
                EntityName: 'MJ: Actions',
                ExtraFilter: 'Status = \'Active\'',
                OrderBy: 'Category, Name',
                ResultType: 'entity_object',
                MaxRows: 5000
            },
            {
                EntityName: 'MJ: Action Categories',
                ExtraFilter: 'Status = \'Active\'',
                OrderBy: 'Name',
                ResultType: 'entity_object',
                MaxRows: 1000
            }
        ]);
        if (actionsResult.Success) {
            const actions = (actionsResult.Results || []).map(action => ({
                ...action.GetAll(),
                selected: false,
                categoryName: action.Category || 'Uncategorized'
            }));
            this.allActions$.next(actions);
        }
        if (categoriesResult.Success) {
            this.categories$.next(categoriesResult.Results || []);
        }
    }
    buildCategoryTree() {
        const actions = this.allActions$.value;
        const categories = this.categories$.value;
        // Count actions per category
        const categoryCounts = new Map();
        actions.forEach(action => {
            const categoryName = action.categoryName || 'Uncategorized';
            categoryCounts.set(categoryName, (categoryCounts.get(categoryName) || 0) + 1);
        });
        // Build tree nodes
        const treeNodes = [
            {
                id: 'all',
                name: 'All Actions',
                count: actions.length,
                icon: 'fa-th'
            }
        ];
        // Add category nodes
        categories.forEach(category => {
            const count = categoryCounts.get(category.Name) || 0;
            if (count > 0) {
                treeNodes.push({
                    id: category.ID,
                    name: category.Name,
                    count,
                    icon: this.getCategoryIcon(category.Name)
                });
            }
        });
        // Add uncategorized if needed
        const uncategorizedCount = categoryCounts.get('Uncategorized') || 0;
        if (uncategorizedCount > 0) {
            treeNodes.push({
                id: 'uncategorized',
                name: 'Uncategorized',
                count: uncategorizedCount,
                icon: 'fa-question-circle'
            });
        }
        this.categoryTree$.next(treeNodes);
    }
    getCategoryIcon(categoryName) {
        const iconMap = {
            'Data': 'fa-database',
            'Communication': 'fa-envelope',
            'Integration': 'fa-plug',
            'Security': 'fa-shield-alt',
            'Workflow': 'fa-project-diagram',
            'AI': 'fa-brain',
            'Files': 'fa-file-alt',
            'Utilities': 'fa-tools',
            'System': 'fa-cog',
            'Analytics': 'fa-chart-line'
        };
        return iconMap[categoryName] || 'fa-folder';
    }
    setupFiltering() {
        combineLatest([
            this.allActions$,
            this.searchControl.valueChanges.pipe(debounceTime(300), distinctUntilChanged(), startWith('') // Emit initial empty value
            ),
            this.selectedCategoryId$
        ]).pipe(takeUntil(this.destroy$)).subscribe(([actions, searchTerm, categoryId]) => {
            this.filterActions(actions, searchTerm || '', categoryId);
        });
    }
    filterActions(actions, searchTerm, categoryId) {
        let filtered = [...actions];
        // Category filter
        if (categoryId !== 'all') {
            if (categoryId === 'uncategorized') {
                filtered = filtered.filter(action => !action.Category);
            }
            else {
                const categoryName = this.getCategoryNameById(categoryId);
                filtered = filtered.filter(action => action.categoryName === categoryName);
            }
        }
        // Search filter
        if (searchTerm) {
            const term = searchTerm.toLowerCase();
            filtered = filtered.filter(action => action.Name.toLowerCase().includes(term) ||
                (action.Description && action.Description.toLowerCase().includes(term)) ||
                (action.categoryName && action.categoryName.toLowerCase().includes(term)));
        }
        this.filteredActions$.next(filtered);
    }
    getCategoryNameById(categoryId) {
        const category = this.categories$.value.find(c => UUIDsEqual(c.ID, categoryId));
        return category?.Name || '';
    }
    preselectExistingActions() {
        if (this.existingActionIds.length > 0) {
            const selected = new Set(this.existingActionIds);
            this.selectedActions$.next(selected);
            // Update action selection state
            const actions = this.allActions$.value;
            actions.forEach(action => {
                action.selected = selected.has(action.ID);
            });
            this.allActions$.next(actions);
        }
    }
    // === UI Event Handlers ===
    selectCategory(categoryId) {
        this.selectedCategoryId$.next(categoryId);
    }
    toggleViewMode() {
        const currentMode = this.viewMode$.value;
        this.viewMode$.next(currentMode === 'grid' ? 'list' : 'grid');
    }
    toggleActionSelection(action) {
        const selected = this.selectedActions$.value;
        const actions = this.allActions$.value;
        // Find the action and toggle its selection
        const actionToUpdate = actions.find(a => UUIDsEqual(a.ID, action.ID));
        if (actionToUpdate) {
            actionToUpdate.selected = !actionToUpdate.selected;
            if (actionToUpdate.selected) {
                selected.add(action.ID);
            }
            else {
                selected.delete(action.ID);
            }
            this.selectedActions$.next(new Set(selected));
            this.allActions$.next(actions);
            // Update filtered actions to reflect selection state
            const filtered = this.filteredActions$.value;
            const filteredAction = filtered.find(a => UUIDsEqual(a.ID, action.ID));
            if (filteredAction) {
                filteredAction.selected = actionToUpdate.selected;
                this.filteredActions$.next(filtered);
            }
        }
    }
    clearSearch() {
        this.searchControl.reset();
    }
    getActionIcon(action) {
        // Return custom icon if set
        if (action.IconClass) {
            return action.IconClass;
        }
        // Fallback icon mapping based on action name/type
        const name = action.Name.toLowerCase();
        if (name.includes('create') || name.includes('add'))
            return 'fa-plus-circle';
        if (name.includes('update') || name.includes('edit'))
            return 'fa-edit';
        if (name.includes('delete') || name.includes('remove'))
            return 'fa-trash';
        if (name.includes('email') || name.includes('send'))
            return 'fa-envelope';
        if (name.includes('export'))
            return 'fa-file-export';
        if (name.includes('import'))
            return 'fa-file-import';
        if (name.includes('report'))
            return 'fa-file-alt';
        if (name.includes('api'))
            return 'fa-plug';
        return 'fa-bolt'; // Default action icon
    }
    // === Dialog Actions ===
    cancel() {
        this.result.next([]);
        this.DialogClose.emit();
    }
    addSelectedActions() {
        const selectedIds = this.selectedActions$.value;
        const allActions = this.allActions$.value;
        // Get the selected action display items (excluding existing ones)
        const selectedDisplayItems = allActions
            .filter(action => selectedIds.has(action.ID) && !this.existingActionIds.some(id => UUIDsEqual(id, action.ID)));
        // Convert ActionDisplayItem to MJActionEntity by casting (they have the same structure)
        const selectedActions = selectedDisplayItems.map(item => item);
        this.result.next(selectedActions);
        this.DialogClose.emit();
    }
    static { this.ɵfac = function AddActionDialogComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || AddActionDialogComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); }; }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AddActionDialogComponent, selectors: [["mj-add-action-dialog"]], outputs: { DialogClose: "DialogClose" }, standalone: false, decls: 44, vars: 35, consts: [[1, "add-action-dialog"], [1, "dialog-header"], [1, "search-section"], [1, "search-input-wrapper"], [1, "fa-solid", "fa-search", "search-prefix-icon"], ["placeholder", "Search actions by name, description, or category...", 1, "mj-input", "search-input", 3, "formControl"], [1, "header-actions"], ["mjButton", "", "variant", "flat", 3, "click", "title"], [1, "fa-solid"], [1, "stats"], [1, "stat-item"], [1, "fa-solid", "fa-bolt"], [1, "dialog-content"], [1, "category-sidebar"], [1, "sidebar-header"], [1, "fa-solid", "fa-folder-tree"], [1, "category-list"], [1, "category-item", 3, "selected"], [1, "actions-container"], [1, "loading-state"], [1, "empty-state"], [1, "actions-grid"], [1, "actions-list"], [1, "selection-summary"], [1, "dialog-footer"], ["mjButton", "", "variant", "flat", 3, "click"], ["mjButton", "", "variant", "primary", 3, "click", "disabled"], [1, "fa-solid", "fa-plus"], [1, "category-item", 3, "click"], [1, "category-name"], [1, "category-count"], [1, "loading-spinner"], [1, "fa-solid", "fa-spinner", "fa-spin", "fa-2x"], [1, "fa-solid", "fa-search-minus"], ["mjButton", "", 3, "click"], [1, "action-card", 3, "selected", "existing"], [1, "action-card", 3, "click"], [1, "selection-indicator"], [1, "card-header"], [1, "action-icon"], [1, "action-name"], [1, "card-body"], [1, "action-description"], [1, "category-badge"], [1, "type-badge"], [1, "existing-overlay"], [1, "fa-solid", "fa-folder"], [1, "fa-solid", "fa-tag"], [1, "fa-solid", "fa-check"], [1, "list-header"], [1, "col-select"], [1, "col-name"], [1, "col-category"], [1, "col-type"], [1, "col-description"], [1, "col-status"], [1, "list-item", 3, "selected", "existing"], [1, "list-item", 3, "click"], [1, "status-badge", "existing"], [1, "status-badge", "available"], [1, "summary-content"], [1, "fa-solid", "fa-check-circle"]], template: function AddActionDialogComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div", 2)(3, "div", 3);
            i0.ɵɵelement(4, "i", 4)(5, "input", 5);
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(6, "div", 6)(7, "button", 7);
            i0.ɵɵpipe(8, "async");
            i0.ɵɵlistener("click", function AddActionDialogComponent_Template_button_click_7_listener() { return ctx.toggleViewMode(); });
            i0.ɵɵelement(9, "i", 8);
            i0.ɵɵpipe(10, "async");
            i0.ɵɵpipe(11, "async");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(12, "div", 9)(13, "span", 10);
            i0.ɵɵelement(14, "i", 11);
            i0.ɵɵtext(15);
            i0.ɵɵelementEnd()()()();
            i0.ɵɵelementStart(16, "div", 12)(17, "div", 13)(18, "div", 14)(19, "h4");
            i0.ɵɵelement(20, "i", 15);
            i0.ɵɵtext(21, " Categories");
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(22, "div", 16);
            i0.ɵɵrepeaterCreate(23, AddActionDialogComponent_For_24_Template, 7, 9, "div", 17, _forTrack0);
            i0.ɵɵpipe(25, "async");
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(26, "div", 18);
            i0.ɵɵconditionalCreate(27, AddActionDialogComponent_Conditional_27_Template, 5, 0, "div", 19);
            i0.ɵɵpipe(28, "async");
            i0.ɵɵconditionalCreate(29, AddActionDialogComponent_Conditional_29_Template, 8, 0, "div", 20);
            i0.ɵɵpipe(30, "async");
            i0.ɵɵconditionalCreate(31, AddActionDialogComponent_Conditional_31_Template, 4, 2, "div", 21);
            i0.ɵɵpipe(32, "async");
            i0.ɵɵpipe(33, "async");
            i0.ɵɵconditionalCreate(34, AddActionDialogComponent_Conditional_34_Template, 16, 2, "div", 22);
            i0.ɵɵpipe(35, "async");
            i0.ɵɵpipe(36, "async");
            i0.ɵɵelementEnd()();
            i0.ɵɵconditionalCreate(37, AddActionDialogComponent_Conditional_37_Template, 5, 2, "div", 23);
            i0.ɵɵelementStart(38, "div", 24)(39, "button", 25);
            i0.ɵɵlistener("click", function AddActionDialogComponent_Template_button_click_39_listener() { return ctx.cancel(); });
            i0.ɵɵtext(40, " Cancel ");
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(41, "button", 26);
            i0.ɵɵlistener("click", function AddActionDialogComponent_Template_button_click_41_listener() { return ctx.addSelectedActions(); });
            i0.ɵɵelement(42, "i", 27);
            i0.ɵɵtext(43);
            i0.ɵɵelementEnd()()();
        } if (rf & 2) {
            i0.ɵɵadvance(5);
            i0.ɵɵproperty("formControl", ctx.searchControl);
            i0.ɵɵadvance(2);
            i0.ɵɵproperty("title", i0.ɵɵpipeBind1(8, 15, ctx.viewMode$) === "grid" ? "Switch to list view" : "Switch to grid view");
            i0.ɵɵadvance(2);
            i0.ɵɵclassProp("fa-th", i0.ɵɵpipeBind1(10, 17, ctx.viewMode$) === "grid")("fa-list", i0.ɵɵpipeBind1(11, 19, ctx.viewMode$) === "list");
            i0.ɵɵadvance(6);
            i0.ɵɵtextInterpolate2(" ", ctx.filteredCount, " of ", ctx.totalActionCount, " actions ");
            i0.ɵɵadvance(8);
            i0.ɵɵrepeater(i0.ɵɵpipeBind1(25, 21, ctx.categoryTree$));
            i0.ɵɵadvance(4);
            i0.ɵɵconditional(i0.ɵɵpipeBind1(28, 23, ctx.isLoading$) ? 27 : -1);
            i0.ɵɵadvance(2);
            i0.ɵɵconditional(!i0.ɵɵpipeBind1(30, 25, ctx.isLoading$) && ctx.filteredCount === 0 ? 29 : -1);
            i0.ɵɵadvance(2);
            i0.ɵɵconditional(!i0.ɵɵpipeBind1(32, 27, ctx.isLoading$) && i0.ɵɵpipeBind1(33, 29, ctx.viewMode$) === "grid" && ctx.filteredCount > 0 ? 31 : -1);
            i0.ɵɵadvance(3);
            i0.ɵɵconditional(!i0.ɵɵpipeBind1(35, 31, ctx.isLoading$) && i0.ɵɵpipeBind1(36, 33, ctx.viewMode$) === "list" && ctx.filteredCount > 0 ? 34 : -1);
            i0.ɵɵadvance(3);
            i0.ɵɵconditional(ctx.selectedCount > 0 ? 37 : -1);
            i0.ɵɵadvance(4);
            i0.ɵɵproperty("disabled", ctx.selectedCount === 0);
            i0.ɵɵadvance(2);
            i0.ɵɵtextInterpolate1(" Add Selected (", ctx.selectedCount, ") ");
        } }, dependencies: [i1.DefaultValueAccessor, i1.NgControlStatus, i1.FormControlDirective, i2.MJButtonDirective, i3.AsyncPipe], styles: [".add-action-dialog[_ngcontent-%COMP%] {\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n}\n\n\n\n[_nghost-%COMP%]     .k-dialog, \n[_nghost-%COMP%]     .k-window {\n  z-index: 10000 !important;\n}\n\n[_nghost-%COMP%]     .k-overlay {\n  z-index: 9999 !important;\n}\n\n\n\n.add-action-dialog[_ngcontent-%COMP%]   .dialog-header[_ngcontent-%COMP%] {\n  display: flex;\n  align-items: center;\n  gap: 1rem;\n  padding: 1rem 1.5rem;\n  border-bottom: 1px solid var(--mj-border-default);\n  background: var(--mj-bg-surface-card);\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .dialog-header[_ngcontent-%COMP%]   .search-section[_ngcontent-%COMP%] {\n  flex: 1;\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .dialog-header[_ngcontent-%COMP%]   .search-section[_ngcontent-%COMP%]   .search-input[_ngcontent-%COMP%] {\n  width: 100%;\n  max-width: 400px;\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .dialog-header[_ngcontent-%COMP%]   .header-actions[_ngcontent-%COMP%] {\n  display: flex;\n  align-items: center;\n  gap: 1rem;\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .dialog-header[_ngcontent-%COMP%]   .header-actions[_ngcontent-%COMP%]   .stats[_ngcontent-%COMP%]   .stat-item[_ngcontent-%COMP%] {\n  display: flex;\n  align-items: center;\n  gap: 0.5rem;\n  color: var(--mj-text-muted);\n  font-size: 0.9rem;\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .dialog-header[_ngcontent-%COMP%]   .header-actions[_ngcontent-%COMP%]   .stats[_ngcontent-%COMP%]   .stat-item[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n  color: var(--mj-status-success);\n}\n\n\n\n.add-action-dialog[_ngcontent-%COMP%]   .dialog-content[_ngcontent-%COMP%] {\n  display: flex;\n  flex: 1;\n  overflow: hidden;\n}\n\n\n\n.add-action-dialog[_ngcontent-%COMP%]   .category-sidebar[_ngcontent-%COMP%] {\n  width: 250px;\n  background: var(--mj-bg-surface-card);\n  border-right: 1px solid var(--mj-border-default);\n  overflow-y: auto;\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .category-sidebar[_ngcontent-%COMP%]   .sidebar-header[_ngcontent-%COMP%] {\n  padding: 1rem;\n  border-bottom: 1px solid var(--mj-border-default);\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .category-sidebar[_ngcontent-%COMP%]   .sidebar-header[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%] {\n  margin: 0;\n  color: var(--mj-text-secondary);\n  font-size: 1rem;\n  font-weight: 600;\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .category-sidebar[_ngcontent-%COMP%]   .sidebar-header[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n  margin-right: 0.5rem;\n  color: var(--mj-text-muted);\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .category-sidebar[_ngcontent-%COMP%]   .category-list[_ngcontent-%COMP%] {\n  padding: 0.5rem 0;\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .category-sidebar[_ngcontent-%COMP%]   .category-list[_ngcontent-%COMP%]   .category-item[_ngcontent-%COMP%] {\n  display: flex;\n  align-items: center;\n  padding: 0.75rem 1rem;\n  cursor: pointer;\n  transition: all 0.2s ease;\n  border-left: 3px solid transparent;\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .category-sidebar[_ngcontent-%COMP%]   .category-list[_ngcontent-%COMP%]   .category-item[_ngcontent-%COMP%]:hover {\n  background: var(--mj-bg-surface-sunken);\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .category-sidebar[_ngcontent-%COMP%]   .category-list[_ngcontent-%COMP%]   .category-item.selected[_ngcontent-%COMP%] {\n  background: color-mix(in srgb, var(--mj-brand-primary) 8%, var(--mj-bg-surface));\n  border-left-color: var(--mj-brand-primary);\n  color: var(--mj-brand-primary);\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .category-sidebar[_ngcontent-%COMP%]   .category-list[_ngcontent-%COMP%]   .category-item.selected[_ngcontent-%COMP%]   .category-icon[_ngcontent-%COMP%] {\n  color: var(--mj-brand-primary);\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .category-sidebar[_ngcontent-%COMP%]   .category-list[_ngcontent-%COMP%]   .category-item[_ngcontent-%COMP%]   .category-icon[_ngcontent-%COMP%] {\n  width: 16px;\n  text-align: center;\n  margin-right: 0.75rem;\n  color: var(--mj-text-muted);\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .category-sidebar[_ngcontent-%COMP%]   .category-list[_ngcontent-%COMP%]   .category-item[_ngcontent-%COMP%]   .category-name[_ngcontent-%COMP%] {\n  flex: 1;\n  font-weight: 500;\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .category-sidebar[_ngcontent-%COMP%]   .category-list[_ngcontent-%COMP%]   .category-item[_ngcontent-%COMP%]   .category-count[_ngcontent-%COMP%] {\n  background: var(--mj-border-default);\n  color: var(--mj-text-secondary);\n  padding: 0.25rem 0.5rem;\n  border-radius: 12px;\n  font-size: 0.8rem;\n  font-weight: 600;\n  min-width: 24px;\n  text-align: center;\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .category-sidebar[_ngcontent-%COMP%]   .category-list[_ngcontent-%COMP%]   .category-item.selected[_ngcontent-%COMP%]   .category-count[_ngcontent-%COMP%] {\n  background: color-mix(in srgb, var(--mj-brand-primary) 25%, var(--mj-bg-surface));\n  color: var(--mj-brand-primary);\n}\n\n\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%] {\n  flex: 1;\n  padding: 1.5rem;\n  overflow-y: auto;\n  background: var(--mj-bg-surface);\n}\n\n\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .loading-state[_ngcontent-%COMP%] {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  height: 200px;\n  color: var(--mj-text-muted);\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .loading-state[_ngcontent-%COMP%]   .loading-spinner[_ngcontent-%COMP%] {\n  margin-bottom: 1rem;\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .loading-state[_ngcontent-%COMP%]   .loading-spinner[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n  color: var(--mj-brand-primary);\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .loading-state[_ngcontent-%COMP%]   p[_ngcontent-%COMP%] {\n  margin-top: 1rem;\n  font-size: 1.1rem;\n}\n\n\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .empty-state[_ngcontent-%COMP%] {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  height: 300px;\n  color: var(--mj-text-muted);\n  text-align: center;\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .empty-state[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n  font-size: 3rem;\n  margin-bottom: 1rem;\n  color: var(--mj-border-default);\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .empty-state[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%] {\n  margin: 0 0 0.5rem 0;\n  color: var(--mj-text-secondary);\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .empty-state[_ngcontent-%COMP%]   p[_ngcontent-%COMP%] {\n  margin: 0 0 1.5rem 0;\n}\n\n\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-grid[_ngcontent-%COMP%] {\n  display: grid;\n  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));\n  gap: 1.5rem;\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-grid[_ngcontent-%COMP%]   .action-card[_ngcontent-%COMP%] {\n  position: relative;\n  background: var(--mj-bg-surface);\n  border: 2px solid var(--mj-border-default);\n  border-radius: 8px;\n  padding: 1.5rem;\n  cursor: pointer;\n  transition: all 0.2s ease;\n  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-grid[_ngcontent-%COMP%]   .action-card[_ngcontent-%COMP%]:hover {\n  border-color: var(--mj-brand-primary);\n  box-shadow: 0 4px 12px color-mix(in srgb, var(--mj-brand-primary) 15%, transparent);\n  transform: translateY(-2px);\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-grid[_ngcontent-%COMP%]   .action-card.selected[_ngcontent-%COMP%] {\n  border-color: var(--mj-status-success);\n  background: color-mix(in srgb, var(--mj-status-success) 4%, var(--mj-bg-surface));\n  box-shadow: 0 4px 12px color-mix(in srgb, var(--mj-status-success) 15%, transparent);\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-grid[_ngcontent-%COMP%]   .action-card.selected[_ngcontent-%COMP%]   .selection-indicator[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n  color: var(--mj-status-success);\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-grid[_ngcontent-%COMP%]   .action-card.existing[_ngcontent-%COMP%] {\n  border-color: var(--mj-text-muted);\n  background: var(--mj-bg-surface-card);\n  cursor: default;\n  opacity: 0.7;\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-grid[_ngcontent-%COMP%]   .action-card.existing[_ngcontent-%COMP%]:hover {\n  transform: none;\n  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-grid[_ngcontent-%COMP%]   .action-card[_ngcontent-%COMP%]   .selection-indicator[_ngcontent-%COMP%] {\n  position: absolute;\n  top: 1rem;\n  right: 1rem;\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-grid[_ngcontent-%COMP%]   .action-card[_ngcontent-%COMP%]   .selection-indicator[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n  font-size: 1.25rem;\n  color: var(--mj-border-default);\n  transition: color 0.2s ease;\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-grid[_ngcontent-%COMP%]   .action-card[_ngcontent-%COMP%]   .card-header[_ngcontent-%COMP%] {\n  display: flex;\n  align-items: center;\n  margin-bottom: 1rem;\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-grid[_ngcontent-%COMP%]   .action-card[_ngcontent-%COMP%]   .card-header[_ngcontent-%COMP%]   .action-icon[_ngcontent-%COMP%] {\n  width: 40px;\n  height: 40px;\n  background: color-mix(in srgb, var(--mj-brand-primary) 8%, var(--mj-bg-surface));\n  border-radius: 8px;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  margin-right: 1rem;\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-grid[_ngcontent-%COMP%]   .action-card[_ngcontent-%COMP%]   .card-header[_ngcontent-%COMP%]   .action-icon[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n  font-size: 1.25rem;\n  color: var(--mj-brand-primary);\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-grid[_ngcontent-%COMP%]   .action-card[_ngcontent-%COMP%]   .card-header[_ngcontent-%COMP%]   .action-name[_ngcontent-%COMP%] {\n  margin: 0;\n  font-size: 1.1rem;\n  font-weight: 600;\n  color: var(--mj-text-primary);\n  line-height: 1.2;\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-grid[_ngcontent-%COMP%]   .action-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]   .action-description[_ngcontent-%COMP%] {\n  margin: 0 0 1rem 0;\n  color: var(--mj-text-muted);\n  line-height: 1.4;\n  font-size: 0.9rem;\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-grid[_ngcontent-%COMP%]   .action-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]   .category-badge[_ngcontent-%COMP%], \n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-grid[_ngcontent-%COMP%]   .action-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]   .type-badge[_ngcontent-%COMP%] {\n  display: inline-flex;\n  align-items: center;\n  gap: 0.25rem;\n  background: var(--mj-bg-surface-card);\n  color: var(--mj-text-secondary);\n  padding: 0.25rem 0.5rem;\n  border-radius: 4px;\n  font-size: 0.8rem;\n  font-weight: 500;\n  margin-right: 0.5rem;\n  margin-bottom: 0.5rem;\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-grid[_ngcontent-%COMP%]   .action-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]   .category-badge[_ngcontent-%COMP%]   i[_ngcontent-%COMP%], \n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-grid[_ngcontent-%COMP%]   .action-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]   .type-badge[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n  font-size: 0.7rem;\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-grid[_ngcontent-%COMP%]   .action-card[_ngcontent-%COMP%]   .card-body[_ngcontent-%COMP%]   .type-badge[_ngcontent-%COMP%] {\n  background: color-mix(in srgb, var(--mj-status-warning) 15%, var(--mj-bg-surface));\n  color: var(--mj-status-warning);\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-grid[_ngcontent-%COMP%]   .action-card[_ngcontent-%COMP%]   .existing-overlay[_ngcontent-%COMP%] {\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  background: color-mix(in srgb, var(--mj-text-muted) 90%, transparent);\n  color: var(--mj-text-inverse);\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  border-radius: 6px;\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-grid[_ngcontent-%COMP%]   .action-card[_ngcontent-%COMP%]   .existing-overlay[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n  font-size: 2rem;\n  margin-bottom: 0.5rem;\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-grid[_ngcontent-%COMP%]   .action-card[_ngcontent-%COMP%]   .existing-overlay[_ngcontent-%COMP%]   span[_ngcontent-%COMP%] {\n  font-weight: 600;\n}\n\n\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-list[_ngcontent-%COMP%]   .list-header[_ngcontent-%COMP%] {\n  display: grid;\n  grid-template-columns: 40px 1fr 150px 100px 2fr 120px;\n  gap: 1rem;\n  padding: 1rem;\n  background: var(--mj-bg-surface-card);\n  border-radius: 6px;\n  font-weight: 600;\n  color: var(--mj-text-secondary);\n  margin-bottom: 0.5rem;\n  font-size: 0.9rem;\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-list[_ngcontent-%COMP%]   .list-item[_ngcontent-%COMP%] {\n  display: grid;\n  grid-template-columns: 40px 1fr 150px 100px 2fr 120px;\n  gap: 1rem;\n  padding: 1rem;\n  border: 1px solid var(--mj-border-default);\n  border-radius: 6px;\n  margin-bottom: 0.5rem;\n  cursor: pointer;\n  transition: all 0.2s ease;\n  align-items: center;\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-list[_ngcontent-%COMP%]   .list-item[_ngcontent-%COMP%]:hover {\n  background: var(--mj-bg-surface-card);\n  border-color: var(--mj-brand-primary);\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-list[_ngcontent-%COMP%]   .list-item.selected[_ngcontent-%COMP%] {\n  background: color-mix(in srgb, var(--mj-status-success) 4%, var(--mj-bg-surface));\n  border-color: var(--mj-status-success);\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-list[_ngcontent-%COMP%]   .list-item.selected[_ngcontent-%COMP%]   .col-select[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n  color: var(--mj-status-success);\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-list[_ngcontent-%COMP%]   .list-item.existing[_ngcontent-%COMP%] {\n  background: var(--mj-bg-surface-card);\n  opacity: 0.7;\n  cursor: default;\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-list[_ngcontent-%COMP%]   .list-item.existing[_ngcontent-%COMP%]:hover {\n  background: var(--mj-bg-surface-card);\n  border-color: var(--mj-border-default);\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-list[_ngcontent-%COMP%]   .list-item[_ngcontent-%COMP%]   .col-select[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n  font-size: 1.25rem;\n  color: var(--mj-border-default);\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-list[_ngcontent-%COMP%]   .list-item[_ngcontent-%COMP%]   .col-name[_ngcontent-%COMP%] {\n  display: flex;\n  align-items: center;\n  gap: 0.5rem;\n  font-weight: 500;\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-list[_ngcontent-%COMP%]   .list-item[_ngcontent-%COMP%]   .col-name[_ngcontent-%COMP%]   .action-icon[_ngcontent-%COMP%] {\n  color: var(--mj-brand-primary);\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-list[_ngcontent-%COMP%]   .list-item[_ngcontent-%COMP%]   .col-description[_ngcontent-%COMP%] {\n  color: var(--mj-text-muted);\n  font-size: 0.9rem;\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-list[_ngcontent-%COMP%]   .list-item[_ngcontent-%COMP%]   .status-badge[_ngcontent-%COMP%] {\n  display: inline-flex;\n  align-items: center;\n  gap: 0.25rem;\n  padding: 0.25rem 0.5rem;\n  border-radius: 4px;\n  font-size: 0.8rem;\n  font-weight: 500;\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-list[_ngcontent-%COMP%]   .list-item[_ngcontent-%COMP%]   .status-badge.existing[_ngcontent-%COMP%] {\n  background: var(--mj-text-muted);\n  color: var(--mj-text-inverse);\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-list[_ngcontent-%COMP%]   .list-item[_ngcontent-%COMP%]   .status-badge.available[_ngcontent-%COMP%] {\n  background: color-mix(in srgb, var(--mj-status-success) 15%, var(--mj-bg-surface));\n  color: var(--mj-status-success);\n}\n\n\n\n.add-action-dialog[_ngcontent-%COMP%]   .selection-summary[_ngcontent-%COMP%] {\n  padding: 1rem 1.5rem;\n  background: color-mix(in srgb, var(--mj-status-success) 15%, var(--mj-bg-surface));\n  border-top: 1px solid color-mix(in srgb, var(--mj-status-success) 25%, var(--mj-bg-surface));\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .selection-summary[_ngcontent-%COMP%]   .summary-content[_ngcontent-%COMP%] {\n  display: flex;\n  align-items: center;\n  gap: 0.5rem;\n  color: var(--mj-status-success);\n  font-weight: 500;\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .selection-summary[_ngcontent-%COMP%]   .summary-content[_ngcontent-%COMP%]   i[_ngcontent-%COMP%] {\n  color: var(--mj-status-success);\n}\n\n\n\n.add-action-dialog[_ngcontent-%COMP%]   .dialog-footer[_ngcontent-%COMP%] {\n  display: flex;\n  justify-content: flex-end;\n  gap: 1rem;\n  padding: 1rem 1.5rem;\n  border-top: 1px solid var(--mj-border-default);\n  background: var(--mj-bg-surface-card);\n}\n\n.add-action-dialog[_ngcontent-%COMP%]   .dialog-footer[_ngcontent-%COMP%]   button[_ngcontent-%COMP%] {\n  min-width: 120px;\n}\n\n\n\n@media (max-width: 768px) {\n  .add-action-dialog[_ngcontent-%COMP%]   .dialog-content[_ngcontent-%COMP%] {\n    flex-direction: column;\n  }\n\n  .add-action-dialog[_ngcontent-%COMP%]   .category-sidebar[_ngcontent-%COMP%] {\n    width: 100%;\n    max-height: 200px;\n  }\n\n  .add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-grid[_ngcontent-%COMP%] {\n    grid-template-columns: 1fr;\n  }\n\n  .add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-list[_ngcontent-%COMP%]   .list-header[_ngcontent-%COMP%], \n   .add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-list[_ngcontent-%COMP%]   .list-item[_ngcontent-%COMP%] {\n    grid-template-columns: 40px 1fr 80px;\n    gap: 0.5rem;\n  }\n\n  .add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-list[_ngcontent-%COMP%]   .list-header[_ngcontent-%COMP%]   .col-category[_ngcontent-%COMP%], \n   .add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-list[_ngcontent-%COMP%]   .list-header[_ngcontent-%COMP%]   .col-type[_ngcontent-%COMP%], \n   .add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-list[_ngcontent-%COMP%]   .list-header[_ngcontent-%COMP%]   .col-description[_ngcontent-%COMP%], \n   .add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-list[_ngcontent-%COMP%]   .list-item[_ngcontent-%COMP%]   .col-category[_ngcontent-%COMP%], \n   .add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-list[_ngcontent-%COMP%]   .list-item[_ngcontent-%COMP%]   .col-type[_ngcontent-%COMP%], \n   .add-action-dialog[_ngcontent-%COMP%]   .actions-container[_ngcontent-%COMP%]   .actions-list[_ngcontent-%COMP%]   .list-item[_ngcontent-%COMP%]   .col-description[_ngcontent-%COMP%] {\n    display: none;\n  }\n}"] }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AddActionDialogComponent, [{
        type: Component,
        args: [{ standalone: false, selector: 'mj-add-action-dialog', template: "<!-- Add Action Dialog -->\n<div class=\"add-action-dialog\">\n  \n  <!-- Dialog Header -->\n  <div class=\"dialog-header\">\n    <div class=\"search-section\">\n      <div class=\"search-input-wrapper\">\n        <i class=\"fa-solid fa-search search-prefix-icon\"></i>\n        <input\n          class=\"mj-input search-input\"\n          [formControl]=\"searchControl\"\n          placeholder=\"Search actions by name, description, or category...\">\n      </div>\n    </div>\n    \n    <div class=\"header-actions\">\n      <!-- View Toggle -->\n      <button mjButton\n              variant=\"flat\"\n              (click)=\"toggleViewMode()\"\n              [title]=\"(viewMode$ | async) === 'grid' ? 'Switch to list view' : 'Switch to grid view'\">\n        <i class=\"fa-solid\"\n           [class.fa-th]=\"(viewMode$ | async) === 'grid'\"\n           [class.fa-list]=\"(viewMode$ | async) === 'list'\"></i>\n      </button>\n      \n      <!-- Stats -->\n      <div class=\"stats\">\n        <span class=\"stat-item\">\n          <i class=\"fa-solid fa-bolt\"></i>\n          {{ filteredCount }} of {{ totalActionCount }} actions\n        </span>\n      </div>\n    </div>\n  </div>\n\n  <!-- Main Content -->\n  <div class=\"dialog-content\">\n    \n    <!-- Category Sidebar -->\n    <div class=\"category-sidebar\">\n      <div class=\"sidebar-header\">\n        <h4><i class=\"fa-solid fa-folder-tree\"></i> Categories</h4>\n      </div>\n      \n      <div class=\"category-list\">\n        @for (category of categoryTree$ | async; track category.id) {\n          <div class=\"category-item\" \n               [class.selected]=\"(selectedCategoryId$ | async) === category.id\"\n               (click)=\"selectCategory(category.id)\">\n            <i class=\"fa-solid {{ category.icon }} category-icon\"></i>\n            <span class=\"category-name\">{{ category.name }}</span>\n            <span class=\"category-count\">{{ category.count }}</span>\n          </div>\n        }\n      </div>\n    </div>\n\n    <!-- Actions Display -->\n    <div class=\"actions-container\">\n      \n      <!-- Loading State -->\n      @if (isLoading$ | async) {\n        <div class=\"loading-state\">\n          <div class=\"loading-spinner\">\n            <i class=\"fa-solid fa-spinner fa-spin fa-2x\"></i>\n          </div>\n          <p>Loading actions...</p>\n        </div>\n      }\n\n      <!-- Empty State -->\n      @if (!(isLoading$ | async) && filteredCount === 0) {\n        <div class=\"empty-state\">\n          <i class=\"fa-solid fa-search-minus\"></i>\n          <h3>No actions found</h3>\n          <p>Try adjusting your search criteria or selecting a different category</p>\n          <button mjButton (click)=\"clearSearch()\">Clear Search</button>\n        </div>\n      }\n\n      <!-- Grid View -->\n      @if (!(isLoading$ | async) && (viewMode$ | async) === 'grid' && filteredCount > 0) {\n        <div class=\"actions-grid\">\n          @for (action of filteredActions$ | async; track action.ID) {\n            <div class=\"action-card\" \n                 [class.selected]=\"action.selected\"\n                 [class.existing]=\"existingActionIds.includes(action.ID)\"\n                 (click)=\"toggleActionSelection(action)\">\n              \n              <!-- Selection Indicator -->\n              <div class=\"selection-indicator\">\n                <i class=\"fa-solid\" \n                   [class.fa-check-circle]=\"action.selected\" \n                   [class.fa-circle]=\"!action.selected\"></i>\n              </div>\n              \n              <!-- Card Content -->\n              <div class=\"card-header\">\n                <div class=\"action-icon\">\n                  <i class=\"fa-solid {{ getActionIcon(action) }}\"></i>\n                </div>\n                <h3 class=\"action-name\">{{ action.Name }}</h3>\n              </div>\n              \n              <div class=\"card-body\">\n                <p class=\"action-description\">{{ action.Description || 'No description available' }}</p>\n                \n                @if (action.categoryName) {\n                  <div class=\"category-badge\">\n                    <i class=\"fa-solid fa-folder\"></i>\n                    {{ action.categoryName }}\n                  </div>\n                }\n                \n                @if (action.Type) {\n                  <div class=\"type-badge\">\n                    <i class=\"fa-solid fa-tag\"></i>\n                    {{ action.Type }}\n                  </div>\n                }\n              </div>\n              \n              <!-- Existing Action Overlay -->\n              @if (existingActionIds.includes(action.ID)) {\n                <div class=\"existing-overlay\">\n                  <i class=\"fa-solid fa-check\"></i>\n                  <span>Already Added</span>\n                </div>\n              }\n            </div>\n          }\n        </div>\n      }\n\n      <!-- List View -->\n      @if (!(isLoading$ | async) && (viewMode$ | async) === 'list' && filteredCount > 0) {\n        <div class=\"actions-list\">\n          \n          <!-- List Header -->\n          <div class=\"list-header\">\n            <span class=\"col-select\"></span>\n            <span class=\"col-name\">Name</span>\n            <span class=\"col-category\">Category</span>\n            <span class=\"col-type\">Type</span>\n            <span class=\"col-description\">Description</span>\n            <span class=\"col-status\">Status</span>\n          </div>\n          \n          <!-- List Items -->\n          @for (action of filteredActions$ | async; track action.ID) {\n            <div class=\"list-item\" \n                 [class.selected]=\"action.selected\"\n                 [class.existing]=\"existingActionIds.includes(action.ID)\"\n                 (click)=\"toggleActionSelection(action)\">\n              \n              <span class=\"col-select\">\n                <i class=\"fa-solid\" \n                   [class.fa-check-circle]=\"action.selected\" \n                   [class.fa-circle]=\"!action.selected\"></i>\n              </span>\n              \n              <span class=\"col-name\">\n                <i class=\"fa-solid {{ getActionIcon(action) }} action-icon\"></i>\n                {{ action.Name }}\n              </span>\n              \n              <span class=\"col-category\">{{ action.categoryName || '-' }}</span>\n              <span class=\"col-type\">{{ action.Type || '-' }}</span>\n              <span class=\"col-description\">{{ action.Description || '-' }}</span>\n              \n              <span class=\"col-status\">\n                @if (existingActionIds.includes(action.ID)) {\n                  <span class=\"status-badge existing\">\n                    <i class=\"fa-solid fa-check\"></i>\n                    Added\n                  </span>\n                } @else {\n                  <span class=\"status-badge available\">\n                    <i class=\"fa-solid fa-plus\"></i>\n                    Available\n                  </span>\n                }\n              </span>\n            </div>\n          }\n        </div>\n      }\n    </div>\n  </div>\n\n  <!-- Selected Actions Summary -->\n  @if (selectedCount > 0) {\n    <div class=\"selection-summary\">\n      <div class=\"summary-content\">\n        <i class=\"fa-solid fa-check-circle\"></i>\n        <span>{{ selectedCount }} action{{ selectedCount === 1 ? '' : 's' }} selected</span>\n      </div>\n    </div>\n  }\n\n  <!-- Dialog Footer -->\n  <div class=\"dialog-footer\">\n    <button mjButton\n            variant=\"flat\"\n            (click)=\"cancel()\">\n      Cancel\n    </button>\n\n    <button mjButton\n            variant=\"primary\"\n            [disabled]=\"selectedCount === 0\"\n            (click)=\"addSelectedActions()\">\n      <i class=\"fa-solid fa-plus\"></i>\n      Add Selected ({{ selectedCount }})\n    </button>\n  </div>\n</div>", styles: [".add-action-dialog {\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n}\n\n/* Ensure dialog appears above banner and other elements */\n:host ::ng-deep .k-dialog,\n:host ::ng-deep .k-window {\n  z-index: 10000 !important;\n}\n\n:host ::ng-deep .k-overlay {\n  z-index: 9999 !important;\n}\n\n/* === Dialog Header === */\n.add-action-dialog .dialog-header {\n  display: flex;\n  align-items: center;\n  gap: 1rem;\n  padding: 1rem 1.5rem;\n  border-bottom: 1px solid var(--mj-border-default);\n  background: var(--mj-bg-surface-card);\n}\n\n.add-action-dialog .dialog-header .search-section {\n  flex: 1;\n}\n\n.add-action-dialog .dialog-header .search-section .search-input {\n  width: 100%;\n  max-width: 400px;\n}\n\n.add-action-dialog .dialog-header .header-actions {\n  display: flex;\n  align-items: center;\n  gap: 1rem;\n}\n\n.add-action-dialog .dialog-header .header-actions .stats .stat-item {\n  display: flex;\n  align-items: center;\n  gap: 0.5rem;\n  color: var(--mj-text-muted);\n  font-size: 0.9rem;\n}\n\n.add-action-dialog .dialog-header .header-actions .stats .stat-item i {\n  color: var(--mj-status-success);\n}\n\n/* === Main Content === */\n.add-action-dialog .dialog-content {\n  display: flex;\n  flex: 1;\n  overflow: hidden;\n}\n\n/* === Category Sidebar === */\n.add-action-dialog .category-sidebar {\n  width: 250px;\n  background: var(--mj-bg-surface-card);\n  border-right: 1px solid var(--mj-border-default);\n  overflow-y: auto;\n}\n\n.add-action-dialog .category-sidebar .sidebar-header {\n  padding: 1rem;\n  border-bottom: 1px solid var(--mj-border-default);\n}\n\n.add-action-dialog .category-sidebar .sidebar-header h4 {\n  margin: 0;\n  color: var(--mj-text-secondary);\n  font-size: 1rem;\n  font-weight: 600;\n}\n\n.add-action-dialog .category-sidebar .sidebar-header h4 i {\n  margin-right: 0.5rem;\n  color: var(--mj-text-muted);\n}\n\n.add-action-dialog .category-sidebar .category-list {\n  padding: 0.5rem 0;\n}\n\n.add-action-dialog .category-sidebar .category-list .category-item {\n  display: flex;\n  align-items: center;\n  padding: 0.75rem 1rem;\n  cursor: pointer;\n  transition: all 0.2s ease;\n  border-left: 3px solid transparent;\n}\n\n.add-action-dialog .category-sidebar .category-list .category-item:hover {\n  background: var(--mj-bg-surface-sunken);\n}\n\n.add-action-dialog .category-sidebar .category-list .category-item.selected {\n  background: color-mix(in srgb, var(--mj-brand-primary) 8%, var(--mj-bg-surface));\n  border-left-color: var(--mj-brand-primary);\n  color: var(--mj-brand-primary);\n}\n\n.add-action-dialog .category-sidebar .category-list .category-item.selected .category-icon {\n  color: var(--mj-brand-primary);\n}\n\n.add-action-dialog .category-sidebar .category-list .category-item .category-icon {\n  width: 16px;\n  text-align: center;\n  margin-right: 0.75rem;\n  color: var(--mj-text-muted);\n}\n\n.add-action-dialog .category-sidebar .category-list .category-item .category-name {\n  flex: 1;\n  font-weight: 500;\n}\n\n.add-action-dialog .category-sidebar .category-list .category-item .category-count {\n  background: var(--mj-border-default);\n  color: var(--mj-text-secondary);\n  padding: 0.25rem 0.5rem;\n  border-radius: 12px;\n  font-size: 0.8rem;\n  font-weight: 600;\n  min-width: 24px;\n  text-align: center;\n}\n\n.add-action-dialog .category-sidebar .category-list .category-item.selected .category-count {\n  background: color-mix(in srgb, var(--mj-brand-primary) 25%, var(--mj-bg-surface));\n  color: var(--mj-brand-primary);\n}\n\n/* === Actions Container === */\n.add-action-dialog .actions-container {\n  flex: 1;\n  padding: 1.5rem;\n  overflow-y: auto;\n  background: var(--mj-bg-surface);\n}\n\n/* Loading State */\n.add-action-dialog .actions-container .loading-state {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  height: 200px;\n  color: var(--mj-text-muted);\n}\n\n.add-action-dialog .actions-container .loading-state .loading-spinner {\n  margin-bottom: 1rem;\n}\n\n.add-action-dialog .actions-container .loading-state .loading-spinner i {\n  color: var(--mj-brand-primary);\n}\n\n.add-action-dialog .actions-container .loading-state p {\n  margin-top: 1rem;\n  font-size: 1.1rem;\n}\n\n/* Empty State */\n.add-action-dialog .actions-container .empty-state {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  height: 300px;\n  color: var(--mj-text-muted);\n  text-align: center;\n}\n\n.add-action-dialog .actions-container .empty-state i {\n  font-size: 3rem;\n  margin-bottom: 1rem;\n  color: var(--mj-border-default);\n}\n\n.add-action-dialog .actions-container .empty-state h3 {\n  margin: 0 0 0.5rem 0;\n  color: var(--mj-text-secondary);\n}\n\n.add-action-dialog .actions-container .empty-state p {\n  margin: 0 0 1.5rem 0;\n}\n\n/* === Grid View === */\n.add-action-dialog .actions-container .actions-grid {\n  display: grid;\n  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));\n  gap: 1.5rem;\n}\n\n.add-action-dialog .actions-container .actions-grid .action-card {\n  position: relative;\n  background: var(--mj-bg-surface);\n  border: 2px solid var(--mj-border-default);\n  border-radius: 8px;\n  padding: 1.5rem;\n  cursor: pointer;\n  transition: all 0.2s ease;\n  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);\n}\n\n.add-action-dialog .actions-container .actions-grid .action-card:hover {\n  border-color: var(--mj-brand-primary);\n  box-shadow: 0 4px 12px color-mix(in srgb, var(--mj-brand-primary) 15%, transparent);\n  transform: translateY(-2px);\n}\n\n.add-action-dialog .actions-container .actions-grid .action-card.selected {\n  border-color: var(--mj-status-success);\n  background: color-mix(in srgb, var(--mj-status-success) 4%, var(--mj-bg-surface));\n  box-shadow: 0 4px 12px color-mix(in srgb, var(--mj-status-success) 15%, transparent);\n}\n\n.add-action-dialog .actions-container .actions-grid .action-card.selected .selection-indicator i {\n  color: var(--mj-status-success);\n}\n\n.add-action-dialog .actions-container .actions-grid .action-card.existing {\n  border-color: var(--mj-text-muted);\n  background: var(--mj-bg-surface-card);\n  cursor: default;\n  opacity: 0.7;\n}\n\n.add-action-dialog .actions-container .actions-grid .action-card.existing:hover {\n  transform: none;\n  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);\n}\n\n.add-action-dialog .actions-container .actions-grid .action-card .selection-indicator {\n  position: absolute;\n  top: 1rem;\n  right: 1rem;\n}\n\n.add-action-dialog .actions-container .actions-grid .action-card .selection-indicator i {\n  font-size: 1.25rem;\n  color: var(--mj-border-default);\n  transition: color 0.2s ease;\n}\n\n.add-action-dialog .actions-container .actions-grid .action-card .card-header {\n  display: flex;\n  align-items: center;\n  margin-bottom: 1rem;\n}\n\n.add-action-dialog .actions-container .actions-grid .action-card .card-header .action-icon {\n  width: 40px;\n  height: 40px;\n  background: color-mix(in srgb, var(--mj-brand-primary) 8%, var(--mj-bg-surface));\n  border-radius: 8px;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  margin-right: 1rem;\n}\n\n.add-action-dialog .actions-container .actions-grid .action-card .card-header .action-icon i {\n  font-size: 1.25rem;\n  color: var(--mj-brand-primary);\n}\n\n.add-action-dialog .actions-container .actions-grid .action-card .card-header .action-name {\n  margin: 0;\n  font-size: 1.1rem;\n  font-weight: 600;\n  color: var(--mj-text-primary);\n  line-height: 1.2;\n}\n\n.add-action-dialog .actions-container .actions-grid .action-card .card-body .action-description {\n  margin: 0 0 1rem 0;\n  color: var(--mj-text-muted);\n  line-height: 1.4;\n  font-size: 0.9rem;\n}\n\n.add-action-dialog .actions-container .actions-grid .action-card .card-body .category-badge,\n.add-action-dialog .actions-container .actions-grid .action-card .card-body .type-badge {\n  display: inline-flex;\n  align-items: center;\n  gap: 0.25rem;\n  background: var(--mj-bg-surface-card);\n  color: var(--mj-text-secondary);\n  padding: 0.25rem 0.5rem;\n  border-radius: 4px;\n  font-size: 0.8rem;\n  font-weight: 500;\n  margin-right: 0.5rem;\n  margin-bottom: 0.5rem;\n}\n\n.add-action-dialog .actions-container .actions-grid .action-card .card-body .category-badge i,\n.add-action-dialog .actions-container .actions-grid .action-card .card-body .type-badge i {\n  font-size: 0.7rem;\n}\n\n.add-action-dialog .actions-container .actions-grid .action-card .card-body .type-badge {\n  background: color-mix(in srgb, var(--mj-status-warning) 15%, var(--mj-bg-surface));\n  color: var(--mj-status-warning);\n}\n\n.add-action-dialog .actions-container .actions-grid .action-card .existing-overlay {\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  background: color-mix(in srgb, var(--mj-text-muted) 90%, transparent);\n  color: var(--mj-text-inverse);\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  border-radius: 6px;\n}\n\n.add-action-dialog .actions-container .actions-grid .action-card .existing-overlay i {\n  font-size: 2rem;\n  margin-bottom: 0.5rem;\n}\n\n.add-action-dialog .actions-container .actions-grid .action-card .existing-overlay span {\n  font-weight: 600;\n}\n\n/* === List View === */\n.add-action-dialog .actions-container .actions-list .list-header {\n  display: grid;\n  grid-template-columns: 40px 1fr 150px 100px 2fr 120px;\n  gap: 1rem;\n  padding: 1rem;\n  background: var(--mj-bg-surface-card);\n  border-radius: 6px;\n  font-weight: 600;\n  color: var(--mj-text-secondary);\n  margin-bottom: 0.5rem;\n  font-size: 0.9rem;\n}\n\n.add-action-dialog .actions-container .actions-list .list-item {\n  display: grid;\n  grid-template-columns: 40px 1fr 150px 100px 2fr 120px;\n  gap: 1rem;\n  padding: 1rem;\n  border: 1px solid var(--mj-border-default);\n  border-radius: 6px;\n  margin-bottom: 0.5rem;\n  cursor: pointer;\n  transition: all 0.2s ease;\n  align-items: center;\n}\n\n.add-action-dialog .actions-container .actions-list .list-item:hover {\n  background: var(--mj-bg-surface-card);\n  border-color: var(--mj-brand-primary);\n}\n\n.add-action-dialog .actions-container .actions-list .list-item.selected {\n  background: color-mix(in srgb, var(--mj-status-success) 4%, var(--mj-bg-surface));\n  border-color: var(--mj-status-success);\n}\n\n.add-action-dialog .actions-container .actions-list .list-item.selected .col-select i {\n  color: var(--mj-status-success);\n}\n\n.add-action-dialog .actions-container .actions-list .list-item.existing {\n  background: var(--mj-bg-surface-card);\n  opacity: 0.7;\n  cursor: default;\n}\n\n.add-action-dialog .actions-container .actions-list .list-item.existing:hover {\n  background: var(--mj-bg-surface-card);\n  border-color: var(--mj-border-default);\n}\n\n.add-action-dialog .actions-container .actions-list .list-item .col-select i {\n  font-size: 1.25rem;\n  color: var(--mj-border-default);\n}\n\n.add-action-dialog .actions-container .actions-list .list-item .col-name {\n  display: flex;\n  align-items: center;\n  gap: 0.5rem;\n  font-weight: 500;\n}\n\n.add-action-dialog .actions-container .actions-list .list-item .col-name .action-icon {\n  color: var(--mj-brand-primary);\n}\n\n.add-action-dialog .actions-container .actions-list .list-item .col-description {\n  color: var(--mj-text-muted);\n  font-size: 0.9rem;\n}\n\n.add-action-dialog .actions-container .actions-list .list-item .status-badge {\n  display: inline-flex;\n  align-items: center;\n  gap: 0.25rem;\n  padding: 0.25rem 0.5rem;\n  border-radius: 4px;\n  font-size: 0.8rem;\n  font-weight: 500;\n}\n\n.add-action-dialog .actions-container .actions-list .list-item .status-badge.existing {\n  background: var(--mj-text-muted);\n  color: var(--mj-text-inverse);\n}\n\n.add-action-dialog .actions-container .actions-list .list-item .status-badge.available {\n  background: color-mix(in srgb, var(--mj-status-success) 15%, var(--mj-bg-surface));\n  color: var(--mj-status-success);\n}\n\n/* === Selection Summary === */\n.add-action-dialog .selection-summary {\n  padding: 1rem 1.5rem;\n  background: color-mix(in srgb, var(--mj-status-success) 15%, var(--mj-bg-surface));\n  border-top: 1px solid color-mix(in srgb, var(--mj-status-success) 25%, var(--mj-bg-surface));\n}\n\n.add-action-dialog .selection-summary .summary-content {\n  display: flex;\n  align-items: center;\n  gap: 0.5rem;\n  color: var(--mj-status-success);\n  font-weight: 500;\n}\n\n.add-action-dialog .selection-summary .summary-content i {\n  color: var(--mj-status-success);\n}\n\n/* === Dialog Footer === */\n.add-action-dialog .dialog-footer {\n  display: flex;\n  justify-content: flex-end;\n  gap: 1rem;\n  padding: 1rem 1.5rem;\n  border-top: 1px solid var(--mj-border-default);\n  background: var(--mj-bg-surface-card);\n}\n\n.add-action-dialog .dialog-footer button {\n  min-width: 120px;\n}\n\n/* === Responsive Design === */\n@media (max-width: 768px) {\n  .add-action-dialog .dialog-content {\n    flex-direction: column;\n  }\n\n  .add-action-dialog .category-sidebar {\n    width: 100%;\n    max-height: 200px;\n  }\n\n  .add-action-dialog .actions-container .actions-grid {\n    grid-template-columns: 1fr;\n  }\n\n  .add-action-dialog .actions-container .actions-list .list-header,\n  .add-action-dialog .actions-container .actions-list .list-item {\n    grid-template-columns: 40px 1fr 80px;\n    gap: 0.5rem;\n  }\n\n  .add-action-dialog .actions-container .actions-list .list-header .col-category,\n  .add-action-dialog .actions-container .actions-list .list-header .col-type,\n  .add-action-dialog .actions-container .actions-list .list-header .col-description,\n  .add-action-dialog .actions-container .actions-list .list-item .col-category,\n  .add-action-dialog .actions-container .actions-list .list-item .col-type,\n  .add-action-dialog .actions-container .actions-list .list-item .col-description {\n    display: none;\n  }\n}\n"] }]
    }], () => [{ type: i0.ChangeDetectorRef }], { DialogClose: [{
            type: Output
        }] }); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AddActionDialogComponent, { className: "AddActionDialogComponent", filePath: "src/lib/custom/AIAgents/add-action-dialog.component.ts", lineNumber: 32 }); })();
//# sourceMappingURL=add-action-dialog.component.js.map