import * as i4 from '@acorex/components/badge';
import { AXBadgeModule } from '@acorex/components/badge';
import * as i1 from '@acorex/components/button';
import { AXButtonModule } from '@acorex/components/button';
import * as i2 from '@acorex/components/decorators';
import { AXDecoratorModule } from '@acorex/components/decorators';
import { AXDialogService } from '@acorex/components/dialog';
import * as i3 from '@acorex/components/dropdown';
import { AXDropdownModule } from '@acorex/components/dropdown';
import { AXDropdownButtonModule } from '@acorex/components/dropdown-button';
import { AXToastService } from '@acorex/components/toast';
import { AXTree2Component } from '@acorex/components/tree2';
import * as i6 from '@acorex/core/translation';
import { AXTranslationService, AXTranslationModule } from '@acorex/core/translation';
import { AXPPlatformScope } from '@acorex/platform/core';
import { AXPLayoutBuilderService } from '@acorex/platform/layout/builder';
import { AXPThemeLayoutBlockComponent, AXPStateMessageComponent } from '@acorex/platform/layout/components';
import { AXPPageLayoutBaseComponent, AXPPageLayoutComponent, AXPPageLayoutBase } from '@acorex/platform/layout/views';
import * as i5 from '@angular/common';
import { CommonModule } from '@angular/common';
import * as i0 from '@angular/core';
import { inject, Injectable, viewChild, signal, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Subject, takeUntil } from 'rxjs';
import { AXPSettingService, AXPMenuProviderService } from '@acorex/platform/common';
import { cloneDeep } from 'lodash-es';
import { A as AXP_MENU_CUSTOMIZATION_KEY, a as AXP_MENU_CUSTOMIZATION_DEFAULT } from './acorex-modules-application-management-acorex-modules-application-management-BqYLpEvY.mjs';

//#region ----   Menu Management Service   ----
/**
 * Constants for priority calculation
 */
const PRIORITY_BASE_ROOT = 0;
const PRIORITY_BASE_NESTED = 1000;
const PRIORITY_STEP = 10;
class AXPMenuManagementService {
    constructor() {
        //#region ----   Dependencies   ----
        this.settingService = inject(AXPSettingService);
        this.menuProviderService = inject(AXPMenuProviderService);
    }
    //#endregion
    //#region ----   Public Methods   ----
    /**
     * Get menu tree as AXTreeNode[] for ax-tree2 component
     */
    async getMenuTree(scope) {
        // Get RAW menu items WITHOUT middleware (for management purposes)
        const baseItems = await this.menuProviderService.rawItems();
        // Load customizations for the given scope
        const customization = await this.loadCustomization(scope);
        // Merge custom items with base items
        const allItems = [...baseItems, ...customization.customItems];
        // Apply parent overrides to restructure items BEFORE building tree
        const restructuredItems = this.applyParentOverrides(allItems, customization);
        // Convert to tree nodes with metadata
        return this.convertToTreeNodes(restructuredItems, customization);
    }
    /**
     * Sync tree changes back to customization
     * Called automatically when tree structure changes via drag-drop
     */
    async syncTreeChanges(scope, treeNodes) {
        const customization = await this.loadCustomization(scope);
        // Extract and update priorities and parent relationships from tree structure
        this.updateCustomizationFromTree(treeNodes, customization);
        await this.saveCustomization(scope, customization);
    }
    /**
     * Load menu customization for a specific scope
     */
    async loadCustomization(scope) {
        try {
            const scopedSettings = this.settingService.scope(scope);
            const saved = await scopedSettings.get(AXP_MENU_CUSTOMIZATION_KEY);
            if (saved && saved.version) {
                return saved;
            }
            return cloneDeep(AXP_MENU_CUSTOMIZATION_DEFAULT);
        }
        catch (error) {
            console.warn('Failed to load menu customization, using defaults', error);
            return cloneDeep(AXP_MENU_CUSTOMIZATION_DEFAULT);
        }
    }
    /**
     * Save menu customization for a specific scope
     */
    async saveCustomization(scope, customization) {
        const scopedSettings = this.settingService.scope(scope);
        await scopedSettings.set(AXP_MENU_CUSTOMIZATION_KEY, customization);
        // Clear menu cache to force reload
        this.menuProviderService.clearCache();
    }
    /**
     * Hide a menu item
     */
    async hideMenuItem(scope, menuName) {
        this.validateMenuName(menuName, 'hide');
        const customization = await this.loadCustomization(scope);
        this.ensureOverrideExists(customization, menuName);
        customization.overrides[menuName].hidden = true;
        await this.saveCustomization(scope, customization);
    }
    /**
     * Show a menu item
     */
    async showMenuItem(scope, menuName) {
        this.validateMenuName(menuName, 'show');
        const customization = await this.loadCustomization(scope);
        if (customization.overrides[menuName]) {
            delete customization.overrides[menuName].hidden;
            this.cleanupEmptyOverride(customization, menuName);
        }
        await this.saveCustomization(scope, customization);
    }
    /**
     * Update menu item priority
     */
    async updateMenuPriority(scope, menuName, priority) {
        this.validateMenuName(menuName, 'update priority for');
        const customization = await this.loadCustomization(scope);
        this.ensureOverrideExists(customization, menuName);
        customization.overrides[menuName].priority = priority;
        await this.saveCustomization(scope, customization);
    }
    /**
     * Update menu item properties
     */
    async updateMenuProperties(scope, menuName, properties) {
        this.validateMenuName(menuName, 'update properties for');
        const customization = await this.loadCustomization(scope);
        this.ensureOverrideExists(customization, menuName);
        customization.overrides[menuName].properties = {
            ...customization.overrides[menuName].properties,
            ...properties,
        };
        await this.saveCustomization(scope, customization);
    }
    /**
     * Add custom menu item
     */
    async addCustomMenuItem(scope, menuItem, parent) {
        const customization = await this.loadCustomization(scope);
        // Generate unique name if not provided
        if (!menuItem.name) {
            menuItem.name = `custom-menu-${Date.now()}`;
        }
        customization.customItems.push(menuItem);
        await this.saveCustomization(scope, customization);
    }
    /**
     * Update custom menu item
     */
    async updateCustomMenuItem(scope, menuName, menuItem) {
        this.validateMenuName(menuName, 'update');
        const customization = await this.loadCustomization(scope);
        const index = customization.customItems.findIndex((item) => item.name === menuName);
        if (index === -1) {
            throw new Error(`Custom menu item '${menuName}' not found`);
        }
        customization.customItems[index] = menuItem;
        await this.saveCustomization(scope, customization);
    }
    /**
     * Delete custom menu item
     */
    async deleteCustomMenuItem(scope, menuName) {
        this.validateMenuName(menuName, 'delete');
        const customization = await this.loadCustomization(scope);
        const initialLength = customization.customItems.length;
        customization.customItems = customization.customItems.filter((item) => item.name !== menuName);
        if (customization.customItems.length === initialLength) {
            throw new Error(`Custom menu item '${menuName}' not found`);
        }
        await this.saveCustomization(scope, customization);
    }
    /**
     * Reset all customizations for a scope
     */
    async resetCustomizations(scope) {
        await this.saveCustomization(scope, cloneDeep(AXP_MENU_CUSTOMIZATION_DEFAULT));
    }
    //#endregion
    //#region ----   Private Methods   ----
    /**
     * Apply parent overrides from customization to restructure menu items
     * This ensures the tree reflects saved parent changes (moves)
     */
    applyParentOverrides(items, customization) {
        // First, flatten all items into a map for easy lookup
        const itemMap = this.flattenMenuItems(items);
        // Build new structure based on effective parent relationships
        const rootItems = [];
        const childrenMap = new Map();
        for (const [itemName, item] of itemMap.entries()) {
            const override = customization.overrides[itemName];
            // Determine effective parent (override takes precedence)
            let effectiveParent;
            if (override?.parentName !== undefined) {
                // parentName is explicitly set (could be null for root, or a parent name)
                effectiveParent = override.parentName;
            }
            else {
                // No override - find original parent by searching original structure
                effectiveParent = this.findOriginalParent(items, itemName);
            }
            if (effectiveParent === null || effectiveParent === undefined) {
                // Root level item
                rootItems.push(item);
            }
            else {
                // Child item - add to parent's children
                if (!childrenMap.has(effectiveParent)) {
                    childrenMap.set(effectiveParent, []);
                }
                childrenMap.get(effectiveParent).push(item);
            }
        }
        // Attach children to their parents recursively
        const attachChildren = (item) => {
            if (item.name && childrenMap.has(item.name)) {
                item.children = childrenMap.get(item.name);
                item.children?.forEach(attachChildren);
            }
        };
        rootItems.forEach(attachChildren);
        return rootItems;
    }
    /**
     * Find the original parent name of an item in the original structure
     * Returns undefined for root items, string for items with parents, null for not found
     */
    findOriginalParent(items, targetName, currentParent) {
        for (const item of items) {
            if (item.name === targetName) {
                return currentParent; // undefined if root, string if has parent
            }
            if (item.children) {
                const found = this.findOriginalParent(item.children, targetName, item.name);
                if (found !== null) {
                    // Found in children (could be undefined for root of subtree, or string for nested item)
                    return found;
                }
                // found === null means not found in this subtree, continue searching
            }
        }
        return null; // Not found in this level or any children
    }
    /**
     * Convert menu items to AXTreeNode[] with metadata
     */
    convertToTreeNodes(items, customization, parentName) {
        const nodes = items.map((item) => {
            const itemName = item.name;
            const override = itemName ? customization.overrides[itemName] : undefined;
            const isCustom = itemName ? customization.customItems.some((ci) => ci.name === itemName) : false;
            // Create metadata
            const metadata = {
                isBuiltIn: !isCustom,
                isCustom,
                isHidden: override?.hidden || false,
                originalPriority: item.priority,
                originalParentName: parentName,
            };
            // Apply priority override
            const effectivePriority = override?.priority !== undefined ? override.priority : item.priority;
            const itemWithPriority = { ...item, priority: effectivePriority };
            // Create tree node data
            const nodeData = {
                menuItem: itemWithPriority,
                metadata,
            };
            // Create tree node
            const treeNode = {
                id: itemName || item.path || this.generateNodeId(),
                label: item.text || item.path || 'Unnamed',
                icon: item.icon,
                expanded: false,
                selected: false,
                visible: true, // Always visible in management interface, CSS handles hidden styling
                children: item.children ? this.convertToTreeNodes(item.children, customization, itemName) : undefined,
                childrenCount: item.children?.length,
                data: nodeData,
            };
            return treeNode;
        });
        // Sort by priority
        nodes.sort((a, b) => {
            const aPriority = a.data?.menuItem.priority ?? 0;
            const bPriority = b.data?.menuItem.priority ?? 0;
            return aPriority - bPriority;
        });
        return nodes;
    }
    /**
     * Update customization from tree structure
     * Extracts priorities and parent relationships from tree nodes
     */
    updateCustomizationFromTree(treeNodes, customization, parentName) {
        // Calculate base priority for this level to maintain relative ordering
        const basePriority = parentName ? PRIORITY_BASE_NESTED : PRIORITY_BASE_ROOT;
        const priorityStep = PRIORITY_STEP;
        treeNodes.forEach((node, index) => {
            const nodeData = node.data;
            const menuItem = nodeData?.menuItem;
            if (menuItem?.name) {
                this.ensureOverrideExists(customization, menuItem.name);
                // Calculate new priority based on current position
                const newPriority = basePriority + index * priorityStep;
                // Get current effective priority (considering existing overrides)
                const currentEffectivePriority = customization.overrides[menuItem.name]?.priority ?? nodeData.metadata.originalPriority ?? 0;
                // Always update priority to reflect current position in tree
                // This ensures reordering works correctly even after multiple moves
                if (newPriority !== currentEffectivePriority) {
                    customization.overrides[menuItem.name].priority = newPriority;
                }
                // Determine current effective parent (considering existing overrides)
                const currentEffectiveParent = customization.overrides[menuItem.name]?.parentName ?? nodeData.metadata.originalParentName;
                // Update parent relationship if it changed from current effective parent
                if (parentName !== currentEffectiveParent) {
                    if (parentName) {
                        customization.overrides[menuItem.name].parentName = parentName;
                    }
                    else {
                        // Moving to root - set to null (not undefined) so middleware will process it
                        // moveTo(null) moves the item to root level
                        customization.overrides[menuItem.name].parentName = null;
                    }
                }
                // Clean up empty overrides
                this.cleanupEmptyOverride(customization, menuItem.name);
                // Recursively process children
                if (node.children && node.children.length > 0) {
                    this.updateCustomizationFromTree(node.children, customization, menuItem.name);
                }
            }
        });
    }
    /**
     * Validate menu name before operations
     */
    validateMenuName(menuName, operation) {
        if (!menuName) {
            throw new Error(`Menu item must have a name to be ${operation}`);
        }
    }
    /**
     * Ensure override object exists for a menu item
     */
    ensureOverrideExists(customization, menuName) {
        if (!customization.overrides[menuName]) {
            customization.overrides[menuName] = {};
        }
    }
    /**
     * Clean up empty override objects
     */
    cleanupEmptyOverride(customization, menuName) {
        if (Object.keys(customization.overrides[menuName] || {}).length === 0) {
            delete customization.overrides[menuName];
        }
    }
    /**
     * Flatten menu items recursively into a map
     */
    flattenMenuItems(items) {
        const itemMap = new Map();
        const flatten = (itemList) => {
            for (const item of itemList) {
                if (item.name) {
                    // Clone item without children to rebuild structure
                    itemMap.set(item.name, { ...item, children: undefined });
                }
                if (item.children) {
                    flatten(item.children);
                }
            }
        };
        flatten(items);
        return itemMap;
    }
    /**
     * Generate unique ID for tree nodes
     */
    generateNodeId() {
        return `node-${Date.now()}-${Math.floor(Math.random() * 10000)}`;
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPMenuManagementService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPMenuManagementService, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPMenuManagementService, decorators: [{
            type: Injectable,
            args: [{ providedIn: 'root' }]
        }] });

//#region ----   Menu List Component   ----
class AXMMenuListComponent extends AXPPageLayoutBaseComponent {
    constructor() {
        super(...arguments);
        //#region ----   Dependencies   ----
        this.menuManagementService = inject(AXPMenuManagementService);
        this.layoutBuilder = inject(AXPLayoutBuilderService);
        this.dialogService = inject(AXDialogService);
        this.toastService = inject(AXToastService);
        this.translationService = inject(AXTranslationService);
        this.route = inject(ActivatedRoute);
        //#endregion
        //#region ----   Component State   ----
        this.tree = viewChild(AXTree2Component, ...(ngDevMode ? [{ debugName: "tree" }] : []));
        this.treeNodes = signal([], ...(ngDevMode ? [{ debugName: "treeNodes" }] : []));
        this.isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
        this.error = signal('', ...(ngDevMode ? [{ debugName: "error" }] : []));
        this.currentScope = signal(AXPPlatformScope.User, ...(ngDevMode ? [{ debugName: "currentScope" }] : []));
        this.isSyncing = false; // Prevent concurrent sync operations
        this.destroy$ = new Subject(); // For subscription cleanup
    }
    //#endregion
    //#region ----   Lifecycle   ----
    async ngOnInit() {
        await super.ngOnInit();
        // Get scope from route (with memory leak prevention)
        this.route.params.pipe(takeUntil(this.destroy$)).subscribe(async (params) => {
            const scope = params['scope'];
            if (scope) {
                this.currentScope.set(scope);
                await this.loadMenuItems();
                this.recompute(); // Update page header after loading
            }
        });
    }
    ngOnDestroy() {
        this.destroy$.next();
        this.destroy$.complete();
    }
    //#endregion
    //#region ----   Event Handlers   ----
    /**
     * Handle before drop validation
     */
    handleBeforeDrop(e) {
        const targetParent = e.currentParent?.data;
        // Prevent dropping into items with paths (leaf nodes)
        if (targetParent?.menuItem?.path) {
            e.canceled = true;
            this.toastService.warning('@application-management:menu-management.messages.move-error');
            return;
        }
        // Note: Circular reference validation is handled by the tree component itself
        // Additional validation can be added here if needed based on business rules
    }
    /**
     * Handle after drop event to sync changes
     */
    async handleAfterDrop() {
        await this.syncTreeChanges();
    }
    //#endregion
    //#region ----   Data Loading   ----
    /**
     * Load menu tree for current scope
     */
    async loadMenuItems() {
        try {
            this.isLoading.set(true);
            this.error.set('');
            const treeNodes = await this.menuManagementService.getMenuTree(this.currentScope());
            this.treeNodes.set(treeNodes);
            this.recompute();
        }
        catch (error) {
            this.error.set(error instanceof Error ? error.message : 'Failed to load menu items');
            this.toastService.danger('@application-management:menu-management.messages.load-error');
        }
        finally {
            this.isLoading.set(false);
        }
    }
    /**
     * Sync tree changes to backend
     */
    async syncTreeChanges() {
        // Prevent concurrent sync operations
        if (this.isSyncing) {
            return;
        }
        try {
            this.isSyncing = true;
            const nodes = this.treeNodes();
            const scope = this.currentScope();
            if (nodes.length === 0) {
                return;
            }
            await this.menuManagementService.syncTreeChanges(scope, nodes);
            this.toastService.success('@application-management:menu-management.messages.reorder-success');
        }
        catch (error) {
            console.error('Failed to sync tree changes:', error);
            this.toastService.danger('@application-management:menu-management.messages.sync-error');
        }
        finally {
            this.isSyncing = false;
        }
    }
    //#endregion
    //#region ----   Page Layout Interface   ----
    /**
     * Get page title
     */
    async getPageTitle() {
        const scopeName = this.currentScope();
        const scopeKey = scopeName === AXPPlatformScope.User ? 'user' : 'tenant';
        return this.translationService.translateAsync(`@application-management:menu-management.${scopeKey}.title`);
    }
    /**
     * Get page description
     */
    async getPageDescription() {
        return this.translationService.translateAsync('@application-management:menu-management.description');
    }
    /**
     * Get primary menu items (actions)
     */
    async getPrimaryMenuItems() {
        return [
            {
                title: await this.translationService.translateAsync('@application-management:menu-management.actions.add-root'),
                icon: 'fa-light fa-plus',
                color: 'primary',
                command: { name: 'add-root' },
            },
        ];
    }
    /**
     * Get secondary menu items
     */
    async getSecondaryMenuItems() {
        return [
            {
                title: await this.translationService.translateAsync('@application-management:menu-management.actions.collapse'),
                icon: 'fa-light fa-minus-square',
                color: 'primary',
                command: { name: 'collapse' },
            },
            {
                title: await this.translationService.translateAsync('@application-management:menu-management.actions.expand'),
                icon: 'fa-light fa-plus-square',
                color: 'primary',
                command: { name: 'expand' },
            },
            {
                title: await this.translationService.translateAsync('@application-management:menu-management.actions.reset'),
                icon: 'fa-light fa-rotate-left',
                color: 'danger',
                command: { name: 'reset' },
            },
        ];
    }
    /**
     * Execute commands from page actions
     */
    async execute(command) {
        switch (command.name) {
            case 'add-root':
                await this.addRootMenuItem();
                break;
            case 'collapse':
                this.tree()?.collapseAll();
                break;
            case 'expand':
                this.tree()?.expandAll();
                break;
            case 'reset':
                await this.resetCustomizations();
                break;
        }
    }
    //#endregion
    //#region ----   Action Handlers   ----
    /**
     * Handle menu item action
     */
    async onAction(action, nodeData) {
        switch (action) {
            case 'show':
                await this.showMenuItem(nodeData);
                break;
            case 'hide':
                await this.hideMenuItem(nodeData);
                break;
            case 'edit':
                await this.editMenuItem(nodeData);
                break;
            case 'delete':
                await this.deleteMenuItem(nodeData);
                break;
            case 'add-child':
                await this.addChildMenuItem(nodeData);
                break;
        }
    }
    /**
     * Add new root menu item
     */
    async addRootMenuItem() {
        await this.showMenuItemDialog(null, null);
    }
    /**
     * Add new child menu item
     */
    async addChildMenuItem(parentNodeData) {
        await this.showMenuItemDialog(null, parentNodeData.menuItem.name);
    }
    /**
     * Reset customizations
     */
    async resetCustomizations() {
        const confirmed = await this.dialogService.confirm('@application-management:menu-management.reset.title', '@application-management:menu-management.reset.message');
        if (!confirmed)
            return;
        try {
            // Reset customizations for current scope
            await this.menuManagementService.resetCustomizations(this.currentScope());
            this.toastService.success('@application-management:menu-management.messages.reset-success');
        }
        catch (error) {
            console.error('Failed to reset customizations:', error);
            this.toastService.danger('@application-management:menu-management.messages.reset-error');
        }
        finally {
            // Reload anyway to show current state
            await this.loadMenuItems();
        }
    }
    //#endregion
    //#region ----   Menu Item Actions   ----
    /**
     * Show menu item
     */
    async showMenuItem(nodeData) {
        await this.executeMenuAction(() => this.menuManagementService.showMenuItem(this.currentScope(), nodeData.menuItem.name), '@application-management:menu-management.messages.show-success', '@application-management:menu-management.messages.show-error');
    }
    /**
     * Hide menu item
     */
    async hideMenuItem(nodeData) {
        await this.executeMenuAction(() => this.menuManagementService.hideMenuItem(this.currentScope(), nodeData.menuItem.name), '@application-management:menu-management.messages.hide-success', '@application-management:menu-management.messages.hide-error');
    }
    /**
     * Edit menu item
     */
    async editMenuItem(nodeData) {
        await this.showMenuItemDialog(nodeData);
    }
    /**
     * Delete custom menu item
     */
    async deleteMenuItem(nodeData) {
        const confirmed = await this.dialogService.confirm('@general:actions.delete.title', '@application-management:menu-management.delete.message');
        if (!confirmed)
            return;
        try {
            const item = nodeData.menuItem;
            if (!item.name)
                return;
            await this.menuManagementService.deleteCustomMenuItem(this.currentScope(), item.name);
            this.toastService.success('@application-management:menu-management.messages.delete-success');
            await this.loadMenuItems();
        }
        catch (error) {
            this.toastService.danger('@application-management:menu-management.messages.delete-error');
        }
    }
    //#endregion
    //#region ----   Dialog Helpers   ----
    /**
     * Show menu item dialog (add/edit)
     */
    async showMenuItemDialog(nodeData, parentName = null) {
        const item = nodeData?.menuItem;
        const isEdit = !!item;
        const title = isEdit
            ? '@application-management:menu-management.edit-dialog.title'
            : '@application-management:menu-management.add-dialog.title';
        const context = {
            name: item?.name || '',
            text: item?.text || '',
            type: item?.type || 'menu',
            icon: item?.icon || '',
            path: item?.path || '',
            description: item?.description || '',
        };
        const dialogRef = await this.layoutBuilder
            .create()
            .dialog((dialog) => {
            dialog
                .setTitle(title)
                .setContext(context)
                .content((flex) => {
                flex
                    .setDirection('column')
                    .formField('@application-management:menu-management.fields.name', (field) => {
                    field.path('name');
                    field.textBox({
                        placeholder: '@application-management:menu-management.fields.name',
                        validations: [{ rule: 'required' }],
                        disabled: isEdit && nodeData?.metadata?.isBuiltIn,
                    });
                })
                    .formField('@application-management:menu-management.fields.text', (field) => {
                    field.path('text');
                    field.textBox({
                        placeholder: '@application-management:menu-management.fields.text',
                        validations: [{ rule: 'required' }],
                    });
                })
                    .formField('@application-management:menu-management.fields.icon', (field) => {
                    field.path('icon');
                    field.customWidget('icon-chooser', {});
                })
                    .formField('@application-management:menu-management.fields.path', (field) => {
                    field.path('path');
                    field.textBox({
                        placeholder: '@application-management:menu-management.fields.path',
                        disabled: isEdit && nodeData?.metadata?.isBuiltIn,
                    });
                })
                    .formField('@application-management:menu-management.fields.description', (field) => {
                    field.path('description');
                    field.largeTextBox({
                        placeholder: '@application-management:menu-management.fields.description',
                        rows: 3,
                    });
                });
            })
                .setActions((actions) => {
                actions.cancel('@general:actions.cancel.title').submit('@general:actions.save.title');
            });
        })
            .show();
        const action = dialogRef.action();
        if (action === 'cancel') {
            dialogRef.close();
            return;
        }
        const formData = dialogRef.context();
        try {
            if (isEdit && item?.name) {
                // Update existing item
                if (nodeData?.metadata?.isCustom) {
                    await this.menuManagementService.updateCustomMenuItem(this.currentScope(), item.name, formData);
                }
                else {
                    await this.menuManagementService.updateMenuProperties(this.currentScope(), item.name, formData);
                }
            }
            else {
                // Add new custom item
                const newItem = {
                    name: formData.name,
                    text: formData.text,
                    icon: formData.icon,
                    path: formData.path,
                    priority: formData.priority,
                    description: formData.description,
                };
                // If parent is specified, add as child
                if (parent?.name) {
                    // Add custom item as child of parent
                    await this.menuManagementService.addCustomMenuItem(this.currentScope(), newItem, parent.name);
                }
                else {
                    // Add as root level item
                    await this.menuManagementService.addCustomMenuItem(this.currentScope(), newItem, null);
                }
            }
            this.toastService.success('@application-management:menu-management.messages.save-success');
            await this.loadMenuItems();
            dialogRef.close();
        }
        catch (error) {
            this.toastService.danger('@application-management:menu-management.messages.save-error');
        }
    }
    /**
     * Execute a menu action with common error handling
     */
    async executeMenuAction(action, successMessage, errorMessage) {
        try {
            await action();
            this.toastService.success(successMessage);
            await this.loadMenuItems();
        }
        catch (error) {
            console.error('Menu action failed:', error);
            this.toastService.danger(errorMessage);
        }
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMMenuListComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: AXMMenuListComponent, isStandalone: true, selector: "axm-menu-list", host: { classAttribute: "axm-menu-list-page" }, providers: [
            {
                provide: AXPPageLayoutBase,
                useExisting: AXMMenuListComponent,
            },
        ], viewQueries: [{ propertyName: "tree", first: true, predicate: AXTree2Component, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<axp-page-layout>\n  <axp-page-content>\n    @if (isLoading()) {\n      <!-- Loading State -->\n      <axp-state-message\n        mode=\"loading\"\n        icon=\"fa-light fa-spinner-third fa-spin\"\n        [title]=\"('@application-management:menu-management.loading.title' | translate | async) || 'Loading...'\"\n        [description]=\"\n          ('@application-management:menu-management.loading.description' | translate | async) || 'Please wait'\n        \"\n      />\n    } @else if (error()) {\n      <!-- Error State -->\n      <axp-state-message\n        mode=\"error\"\n        icon=\"fa-light fa-circle-exclamation\"\n        [title]=\"('@application-management:menu-management.error.title' | translate | async) || 'Error'\"\n        [description]=\"error() || 'An error occurred'\"\n      >\n        <ax-button\n          slot=\"actions\"\n          [text]=\"'@general:actions.retry.title' | translate | async\"\n          [look]=\"'outline'\"\n          [color]=\"'primary'\"\n          (onClick)=\"loadMenuItems()\"\n        >\n          <i class=\"fa-light fa-rotate-left\"></i>\n        </ax-button>\n      </axp-state-message>\n    } @else if (treeNodes().length === 0) {\n      <!-- Empty State -->\n      <axp-state-message\n        mode=\"empty\"\n        icon=\"fa-light fa-bars\"\n        [title]=\"('@application-management:menu-management.empty-state.title' | translate | async) || 'No menu items'\"\n        [description]=\"\n          ('@application-management:menu-management.empty-state.description' | translate | async) ||\n          'Add a new menu item to get started'\n        \"\n      >\n        <ax-button\n          slot=\"actions\"\n          [text]=\"'@application-management:menu-management.actions.add-root' | translate | async\"\n          [look]=\"'solid'\"\n          [color]=\"'primary'\"\n          (onClick)=\"addRootMenuItem()\"\n        >\n          <i class=\"fa-light fa-plus\"></i>\n        </ax-button>\n      </axp-state-message>\n    } @else {\n      <!-- Menu Tree Content -->\n      <div class=\"axm-menu-list__container\">\n        <!-- Menu Tree -->\n        <div class=\"axm-menu-list__tree\">\n          <ax-tree2\n            [(nodes)]=\"treeNodes\"\n            look=\"default\"\n            [itemTemplate]=\"itemTemplate\"\n            [showCheckbox]=\"false\"\n            [showIcons]=\"false\"\n            [showChildrenBadge]=\"false\"\n            [nodeHeight]=\"'normal'\"\n            [dragMode]=\"'handler'\"\n            (onBeforeDrop)=\"handleBeforeDrop($event)\"\n            (onItemsChange)=\"handleAfterDrop()\"\n          ></ax-tree2>\n        </div>\n      </div>\n    }\n  </axp-page-content>\n</axp-page-layout>\n\n<!-- Custom Item Template -->\n<ng-template #itemTemplate let-node=\"node\" let-level=\"level\">\n  @let nodeData = node.data;\n  @let item = nodeData.menuItem;\n  @let metadata = nodeData.metadata;\n  <div\n    class=\"axm-menu-tree-item__wrapper\"\n    [class.axm-menu-tree-item__wrapper--hidden]=\"metadata.isHidden\"\n    [class.axm-menu-tree-item__wrapper--custom]=\"metadata.isCustom\"\n  >\n    <!-- Icon -->\n    @if (item.icon) {\n      <i class=\"axm-menu-tree-item__icon\" [class]=\"item.icon\"></i>\n    }\n\n    <!-- Text or Info -->\n    @if (item.text) {\n      <span class=\"axm-menu-tree-item__text\">\n        {{ item.text | translate | async }}\n      </span>\n    } @else if (item.path) {\n      <span class=\"axm-menu-tree-item__path\">\n        <i class=\"fa-light fa-link\"></i>\n        {{ item.path }}\n      </span>\n    } @else {\n      <span class=\"axm-menu-tree-item__divider\">\n        <i class=\"fa-light fa-minus\"></i>\n        {{ '@application-management:menu-management.badge.divider' | translate | async }}\n      </span>\n    }\n\n    <!-- Menu Name/Key -->\n    @if (item.name) {\n      <code class=\"axm-menu-tree-item__name\">{{ item.name }}</code>\n    }\n\n    <ax-badge [text]=\"item.type ?? 'menu'\" color=\"primary\"></ax-badge>\n\n    <!-- Actions Dropdown -->\n    <ax-button class=\"axm-menu-tree-item__actions\" [look]=\"'blank'\" [size]=\"'sm'\" [iconOnly]=\"true\">\n      <ax-prefix>\n        <i class=\"fa-light fa-ellipsis-vertical\"></i>\n      </ax-prefix>\n\n      <ax-dropdown-panel #panel>\n        <ax-button-item-list>\n          <!-- Edit (only for items with names) -->\n          @if (item.name) {\n            <ax-button-item\n              [text]=\"('@general:actions.edit.title' | translate | async)!\"\n              (onClick)=\"onAction('edit', nodeData); panel.close()\"\n            >\n              <ax-prefix>\n                <i class=\"fa-light fa-edit\"></i>\n              </ax-prefix>\n            </ax-button-item>\n          }\n\n          <!-- Show/Hide (only for items with names) -->\n          @if (item.name && metadata.isBuiltIn) {\n            @if (metadata.isHidden) {\n              <ax-button-item\n                [text]=\"('@application-management:menu-management.actions.show' | translate | async)!\"\n                (onClick)=\"onAction('show', nodeData); panel.close()\"\n              >\n                <ax-prefix>\n                  <i class=\"fa-light fa-eye\"></i>\n                </ax-prefix>\n              </ax-button-item>\n            } @else {\n              <ax-button-item\n                [text]=\"('@application-management:menu-management.actions.hide' | translate | async)!\"\n                (onClick)=\"onAction('hide', nodeData); panel.close()\"\n              >\n                <ax-prefix>\n                  <i class=\"fa-light fa-eye-slash\"></i>\n                </ax-prefix>\n              </ax-button-item>\n            }\n          }\n\n          @if (!item.path && (item.type === 'menu' || !item.type)) {\n            <!-- Add Child -->\n            <ax-button-item\n              [text]=\"('@application-management:menu-management.actions.add-child' | translate | async)!\"\n              (onClick)=\"onAction('add-child', nodeData); panel.close()\"\n            >\n              <ax-prefix>\n                <i class=\"fa-light fa-plus\"></i>\n              </ax-prefix>\n            </ax-button-item>\n          }\n\n          <!-- Delete (only for custom items with names) -->\n          @if (item.name && metadata.isCustom) {\n            <ax-divider></ax-divider>\n            <ax-button-item\n              [color]=\"'danger'\"\n              [text]=\"('@general:actions.delete.title' | translate | async)!\"\n              (onClick)=\"onAction('delete', nodeData); panel.close()\"\n            >\n              <ax-prefix>\n                <i class=\"fa-light fa-trash\"></i>\n              </ax-prefix>\n            </ax-button-item>\n          }\n\n          <!-- Info message for items without names -->\n          @if (!item.name) {\n            <ax-divider></ax-divider>\n            <div class=\"ax-p-2 ax-text-xs ax-text-neutral-500 ax-italic\">\n              {{ '@application-management:menu-management.messages.no-name-info' | translate | async }}\n            </div>\n          }\n        </ax-button-item-list>\n      </ax-dropdown-panel>\n    </ax-button>\n  </div>\n</ng-template>\n", styles: [".axm-menu-list-page .axm-menu-list__container{display:flex;flex-direction:column;gap:1rem;padding:1.5rem}.axm-menu-list-page .axm-menu-list__info-banner{display:flex;align-items:center;gap:.75rem;border-radius:.375rem;padding:1rem;--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-primary-500),var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.axm-menu-list-page .axm-menu-list__info-banner i{font-size:1.125rem;line-height:1.75rem}.axm-menu-list-page .axm-menu-list__info-banner span{font-size:.875rem;line-height:1.25rem}.axm-menu-list-page .axm-menu-list__tree{display:flex;flex-direction:column;gap:.5rem}.axm-menu-list-page .axm-menu-tree-item__wrapper{display:flex;flex:1 1 0%;align-items:center;gap:1rem;border-radius:.375rem;padding:.5rem;border-width:1px;background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface));transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.axm-menu-list-page .axm-menu-tree-item__wrapper:hover{background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface));border-color:rgb(var(--ax-sys-color-border-lighter-surface))}.axm-menu-list-page .axm-menu-tree-item__wrapper--hidden{opacity:.5}.axm-menu-list-page .axm-menu-tree-item__wrapper--custom{--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-primary-500),var(--tw-border-opacity, 1))}.axm-menu-list-page .axm-menu-tree-item__icon{display:flex;align-items:center;justify-content:center;height:1.5rem;width:1.5rem;--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-primary-500),var(--tw-text-opacity, 1))}.axm-menu-list-page .axm-menu-tree-item__text{flex:1 1 0%;font-size:.875rem;line-height:1.25rem;font-weight:500}.axm-menu-list-page .axm-menu-tree-item__divider,.axm-menu-list-page .axm-menu-tree-item__path{display:flex;flex:1 1 0%;align-items:center;gap:.5rem;font-size:.75rem;line-height:1rem;font-style:italic;--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity, 1))}.axm-menu-list-page .axm-menu-tree-item__divider i,.axm-menu-list-page .axm-menu-tree-item__path i{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity, 1))}.axm-menu-list-page .axm-menu-tree-item__name{display:flex;align-items:center;border-radius:.25rem;padding:.25rem .5rem;font-size:.75rem;line-height:1rem;--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(64 64 64 / var(--tw-text-opacity, 1));font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-weight:400;border-width:1px;--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity, 1));white-space:nowrap;-webkit-user-select:all;-moz-user-select:all;user-select:all}.axm-menu-list-page .axm-menu-tree-item__actions{margin-left:.5rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: i1.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i1.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXDropdownButtonModule }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "component", type: i3.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "placement", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type: AXTree2Component, selector: "ax-tree2", inputs: ["nodes", "showCheckbox", "dragMode", "dragOperationType", "showIcons", "showChildrenBadge", "expandedIcon", "collapsedIcon", "indentSize", "nodeHeight", "look", "itemTemplate", "lazyLoad", "enableLazyLoad"], outputs: ["nodesChange", "onBeforeDrop", "onNodeToggle", "onNodeSelect", "onOrderChange", "onMoveChange", "onItemsChange"] }, { kind: "component", type: AXPPageLayoutComponent, selector: "axp-page-layout" }, { kind: "component", type: AXPThemeLayoutBlockComponent, selector: "    axp-page-content,     axp-page-footer-container,    axp-page-footer,    axp-page-header,    axp-page-header-container,    axp-page-toolbar,    axp-layout-content,     axp-layout-page-content,     axp-layout-sections,    axp-layout-body,    axp-layout-page-body,    axp-layout-prefix,    axp-layout-suffix,    axp-layout-title-bar,    axp-layout-title,     axp-layout-title-actions,     axp-layout-nav-button,     axp-layout-description,     axp-layout-breadcrumbs,    axp-layout-list-action,    " }, { kind: "component", type: AXPStateMessageComponent, selector: "axp-state-message", inputs: ["mode", "icon", "title", "description", "variant"] }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i4.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMMenuListComponent, decorators: [{
            type: Component,
            args: [{ selector: 'axm-menu-list', standalone: true, imports: [
                        CommonModule,
                        AXButtonModule,
                        AXDecoratorModule,
                        AXDropdownButtonModule,
                        AXDropdownModule,
                        AXTranslationModule,
                        AXTree2Component,
                        AXPPageLayoutComponent,
                        AXPThemeLayoutBlockComponent,
                        AXPStateMessageComponent,
                        AXBadgeModule,
                    ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
                        {
                            provide: AXPPageLayoutBase,
                            useExisting: AXMMenuListComponent,
                        },
                    ], host: { class: 'axm-menu-list-page' }, template: "<axp-page-layout>\n  <axp-page-content>\n    @if (isLoading()) {\n      <!-- Loading State -->\n      <axp-state-message\n        mode=\"loading\"\n        icon=\"fa-light fa-spinner-third fa-spin\"\n        [title]=\"('@application-management:menu-management.loading.title' | translate | async) || 'Loading...'\"\n        [description]=\"\n          ('@application-management:menu-management.loading.description' | translate | async) || 'Please wait'\n        \"\n      />\n    } @else if (error()) {\n      <!-- Error State -->\n      <axp-state-message\n        mode=\"error\"\n        icon=\"fa-light fa-circle-exclamation\"\n        [title]=\"('@application-management:menu-management.error.title' | translate | async) || 'Error'\"\n        [description]=\"error() || 'An error occurred'\"\n      >\n        <ax-button\n          slot=\"actions\"\n          [text]=\"'@general:actions.retry.title' | translate | async\"\n          [look]=\"'outline'\"\n          [color]=\"'primary'\"\n          (onClick)=\"loadMenuItems()\"\n        >\n          <i class=\"fa-light fa-rotate-left\"></i>\n        </ax-button>\n      </axp-state-message>\n    } @else if (treeNodes().length === 0) {\n      <!-- Empty State -->\n      <axp-state-message\n        mode=\"empty\"\n        icon=\"fa-light fa-bars\"\n        [title]=\"('@application-management:menu-management.empty-state.title' | translate | async) || 'No menu items'\"\n        [description]=\"\n          ('@application-management:menu-management.empty-state.description' | translate | async) ||\n          'Add a new menu item to get started'\n        \"\n      >\n        <ax-button\n          slot=\"actions\"\n          [text]=\"'@application-management:menu-management.actions.add-root' | translate | async\"\n          [look]=\"'solid'\"\n          [color]=\"'primary'\"\n          (onClick)=\"addRootMenuItem()\"\n        >\n          <i class=\"fa-light fa-plus\"></i>\n        </ax-button>\n      </axp-state-message>\n    } @else {\n      <!-- Menu Tree Content -->\n      <div class=\"axm-menu-list__container\">\n        <!-- Menu Tree -->\n        <div class=\"axm-menu-list__tree\">\n          <ax-tree2\n            [(nodes)]=\"treeNodes\"\n            look=\"default\"\n            [itemTemplate]=\"itemTemplate\"\n            [showCheckbox]=\"false\"\n            [showIcons]=\"false\"\n            [showChildrenBadge]=\"false\"\n            [nodeHeight]=\"'normal'\"\n            [dragMode]=\"'handler'\"\n            (onBeforeDrop)=\"handleBeforeDrop($event)\"\n            (onItemsChange)=\"handleAfterDrop()\"\n          ></ax-tree2>\n        </div>\n      </div>\n    }\n  </axp-page-content>\n</axp-page-layout>\n\n<!-- Custom Item Template -->\n<ng-template #itemTemplate let-node=\"node\" let-level=\"level\">\n  @let nodeData = node.data;\n  @let item = nodeData.menuItem;\n  @let metadata = nodeData.metadata;\n  <div\n    class=\"axm-menu-tree-item__wrapper\"\n    [class.axm-menu-tree-item__wrapper--hidden]=\"metadata.isHidden\"\n    [class.axm-menu-tree-item__wrapper--custom]=\"metadata.isCustom\"\n  >\n    <!-- Icon -->\n    @if (item.icon) {\n      <i class=\"axm-menu-tree-item__icon\" [class]=\"item.icon\"></i>\n    }\n\n    <!-- Text or Info -->\n    @if (item.text) {\n      <span class=\"axm-menu-tree-item__text\">\n        {{ item.text | translate | async }}\n      </span>\n    } @else if (item.path) {\n      <span class=\"axm-menu-tree-item__path\">\n        <i class=\"fa-light fa-link\"></i>\n        {{ item.path }}\n      </span>\n    } @else {\n      <span class=\"axm-menu-tree-item__divider\">\n        <i class=\"fa-light fa-minus\"></i>\n        {{ '@application-management:menu-management.badge.divider' | translate | async }}\n      </span>\n    }\n\n    <!-- Menu Name/Key -->\n    @if (item.name) {\n      <code class=\"axm-menu-tree-item__name\">{{ item.name }}</code>\n    }\n\n    <ax-badge [text]=\"item.type ?? 'menu'\" color=\"primary\"></ax-badge>\n\n    <!-- Actions Dropdown -->\n    <ax-button class=\"axm-menu-tree-item__actions\" [look]=\"'blank'\" [size]=\"'sm'\" [iconOnly]=\"true\">\n      <ax-prefix>\n        <i class=\"fa-light fa-ellipsis-vertical\"></i>\n      </ax-prefix>\n\n      <ax-dropdown-panel #panel>\n        <ax-button-item-list>\n          <!-- Edit (only for items with names) -->\n          @if (item.name) {\n            <ax-button-item\n              [text]=\"('@general:actions.edit.title' | translate | async)!\"\n              (onClick)=\"onAction('edit', nodeData); panel.close()\"\n            >\n              <ax-prefix>\n                <i class=\"fa-light fa-edit\"></i>\n              </ax-prefix>\n            </ax-button-item>\n          }\n\n          <!-- Show/Hide (only for items with names) -->\n          @if (item.name && metadata.isBuiltIn) {\n            @if (metadata.isHidden) {\n              <ax-button-item\n                [text]=\"('@application-management:menu-management.actions.show' | translate | async)!\"\n                (onClick)=\"onAction('show', nodeData); panel.close()\"\n              >\n                <ax-prefix>\n                  <i class=\"fa-light fa-eye\"></i>\n                </ax-prefix>\n              </ax-button-item>\n            } @else {\n              <ax-button-item\n                [text]=\"('@application-management:menu-management.actions.hide' | translate | async)!\"\n                (onClick)=\"onAction('hide', nodeData); panel.close()\"\n              >\n                <ax-prefix>\n                  <i class=\"fa-light fa-eye-slash\"></i>\n                </ax-prefix>\n              </ax-button-item>\n            }\n          }\n\n          @if (!item.path && (item.type === 'menu' || !item.type)) {\n            <!-- Add Child -->\n            <ax-button-item\n              [text]=\"('@application-management:menu-management.actions.add-child' | translate | async)!\"\n              (onClick)=\"onAction('add-child', nodeData); panel.close()\"\n            >\n              <ax-prefix>\n                <i class=\"fa-light fa-plus\"></i>\n              </ax-prefix>\n            </ax-button-item>\n          }\n\n          <!-- Delete (only for custom items with names) -->\n          @if (item.name && metadata.isCustom) {\n            <ax-divider></ax-divider>\n            <ax-button-item\n              [color]=\"'danger'\"\n              [text]=\"('@general:actions.delete.title' | translate | async)!\"\n              (onClick)=\"onAction('delete', nodeData); panel.close()\"\n            >\n              <ax-prefix>\n                <i class=\"fa-light fa-trash\"></i>\n              </ax-prefix>\n            </ax-button-item>\n          }\n\n          <!-- Info message for items without names -->\n          @if (!item.name) {\n            <ax-divider></ax-divider>\n            <div class=\"ax-p-2 ax-text-xs ax-text-neutral-500 ax-italic\">\n              {{ '@application-management:menu-management.messages.no-name-info' | translate | async }}\n            </div>\n          }\n        </ax-button-item-list>\n      </ax-dropdown-panel>\n    </ax-button>\n  </div>\n</ng-template>\n", styles: [".axm-menu-list-page .axm-menu-list__container{display:flex;flex-direction:column;gap:1rem;padding:1.5rem}.axm-menu-list-page .axm-menu-list__info-banner{display:flex;align-items:center;gap:.75rem;border-radius:.375rem;padding:1rem;--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-primary-500),var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.axm-menu-list-page .axm-menu-list__info-banner i{font-size:1.125rem;line-height:1.75rem}.axm-menu-list-page .axm-menu-list__info-banner span{font-size:.875rem;line-height:1.25rem}.axm-menu-list-page .axm-menu-list__tree{display:flex;flex-direction:column;gap:.5rem}.axm-menu-list-page .axm-menu-tree-item__wrapper{display:flex;flex:1 1 0%;align-items:center;gap:1rem;border-radius:.375rem;padding:.5rem;border-width:1px;background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface));transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.axm-menu-list-page .axm-menu-tree-item__wrapper:hover{background-color:rgb(var(--ax-sys-color-lighter-surface));color:rgb(var(--ax-sys-color-on-lighter-surface));border-color:rgb(var(--ax-sys-color-border-lighter-surface))}.axm-menu-list-page .axm-menu-tree-item__wrapper--hidden{opacity:.5}.axm-menu-list-page .axm-menu-tree-item__wrapper--custom{--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-primary-500),var(--tw-border-opacity, 1))}.axm-menu-list-page .axm-menu-tree-item__icon{display:flex;align-items:center;justify-content:center;height:1.5rem;width:1.5rem;--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-primary-500),var(--tw-text-opacity, 1))}.axm-menu-list-page .axm-menu-tree-item__text{flex:1 1 0%;font-size:.875rem;line-height:1.25rem;font-weight:500}.axm-menu-list-page .axm-menu-tree-item__divider,.axm-menu-list-page .axm-menu-tree-item__path{display:flex;flex:1 1 0%;align-items:center;gap:.5rem;font-size:.75rem;line-height:1rem;font-style:italic;--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity, 1))}.axm-menu-list-page .axm-menu-tree-item__divider i,.axm-menu-list-page .axm-menu-tree-item__path i{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity, 1))}.axm-menu-list-page .axm-menu-tree-item__name{display:flex;align-items:center;border-radius:.25rem;padding:.25rem .5rem;font-size:.75rem;line-height:1rem;--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(64 64 64 / var(--tw-text-opacity, 1));font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-weight:400;border-width:1px;--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity, 1));white-space:nowrap;-webkit-user-select:all;-moz-user-select:all;user-select:all}.axm-menu-list-page .axm-menu-tree-item__actions{margin-left:.5rem}\n"] }]
        }] });

export { AXMMenuListComponent };
//# sourceMappingURL=acorex-modules-application-management-menu-list.component-D4uW0aXY.mjs.map
