import * as i0 from '@angular/core';
import { Injectable, NgModule, inject, Injector, input, signal, computed, ChangeDetectionStrategy, Component } from '@angular/core';
import * as i1$1 from '@angular/common';
import { CommonModule } from '@angular/common';
import { AXPSessionService, AXP_PERMISSION_DEFINITION_PROVIDER } from '@acorex/platform/auth';
import { createAllQueryView, AXPEntityQueryType, AXPSearchCommandProvider, AXP_MENU_PROVIDER, AXP_SEARCH_PROVIDER } from '@acorex/platform/common';
import { AXMEntityCrudServiceImpl, entityMasterCrudActions, entityMasterRecordActions, AXPEntityService, AXP_ENTITY_DEFINITION_LOADER } from '@acorex/platform/layout/entity';
import { AXPWidgetsCatalog } from '@acorex/platform/layout/widget-core';
import * as i1 from '@angular/router';
import { RouterModule } from '@angular/router';
import { AXPRootLayoutComponent } from '@acorex/platform/themes/default';
import * as i3$1 from '@acorex/core/translation';
import { AXTranslationService, AXTranslationModule } from '@acorex/core/translation';
import { AXPSystemActionType } from '@acorex/platform/core';
import { AXBadgeModule } from '@acorex/components/badge';
import * as i2 from '@acorex/components/button';
import { AXButtonModule } from '@acorex/components/button';
import * as i3 from '@acorex/components/decorators';
import { AXDecoratorModule } from '@acorex/components/decorators';
import * as i2$1 from '@acorex/components/loading';
import { AXLoadingModule } from '@acorex/components/loading';
import { AXFormatModule } from '@acorex/core/format';
import { AXPThemeLayoutBlockComponent, AXPStateMessageComponent } from '@acorex/platform/layout/components';
import { AXPPageLayoutBaseComponent, AXPPageLayoutComponent, AXPPageLayoutBase } from '@acorex/platform/layout/views';

const config = {
    i18n: 'contact-management',
};
const RootConfig = {
    config,
    module: {
        name: 'ContactManagement',
        title: '@contact-management:module-name',
        icon: 'fa-light fa-address-book',
    },
    entities: {
        contactMethodType: {
            name: 'ContactMethodType',
            title: '@contact-management:contact-method-type.individual-title',
            titlePlural: '@contact-management:contact-method-type.plural-title',
            icon: 'fa-light fa-list',
        },
        contactMethod: {
            name: 'ContactMethod',
            title: '@contact-management:contact-method.individual-title',
            titlePlural: '@contact-management:contact-method.plural-title',
            icon: 'fa-light fa-phone',
        },
        emergencyContact: {
            name: 'EmergencyContact',
            title: '@contact-management:emergency-contact.individual-title',
            titlePlural: '@contact-management:emergency-contact.plural-title',
            icon: 'fa-light fa-siren',
        },
    },
};

class AXMContactMethodTypeService extends AXMEntityCrudServiceImpl {
}
class AXMContactMethodTypeServiceImpl extends AXMContactMethodTypeService {
    constructor() {
        super(`${RootConfig.module.name}.${RootConfig.entities.contactMethodType.name}`);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMContactMethodTypeServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMContactMethodTypeServiceImpl }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMContactMethodTypeServiceImpl, decorators: [{
            type: Injectable
        }], ctorParameters: () => [] });

async function contactMethodTypeFactory(injector) {
    const dataService = injector.get(AXMContactMethodTypeService);
    const i18n = RootConfig.config.i18n;
    const entityDef = {
        module: RootConfig.module.name,
        name: RootConfig.entities.contactMethodType.name,
        title: RootConfig.entities.contactMethodType.title,
        icon: RootConfig.entities.contactMethodType.icon,
        formats: {
            individual: RootConfig.entities.contactMethodType.title,
            plural: RootConfig.entities.contactMethodType.titlePlural,
            searchResult: {
                title: '{{ title }}',
                description: RootConfig.module.title,
            },
        },
        plugins: [
            { name: 'history' },
            { name: 'lock' },
            { name: 'compare' },
            { name: 'archive' },
        ],
        groups: [
            {
                id: 'basic-info',
                title: '@general:terms.interface.basic-info',
            },
            {
                id: 'validation',
                title: '@general:terms.validation.validation',
            },
        ],
        properties: [
            {
                name: 'title',
                title: '@general:terms.common.title',
                groupId: 'basic-info',
                options: {
                    sort: { enabled: true },
                    filter: { advance: { enabled: true }, inline: { enabled: true } },
                },
                schema: {
                    dataType: 'string',
                    interface: { type: AXPWidgetsCatalog.text },
                },
                validations: [{ rule: 'required' }],
            },
            {
                name: 'validationRegex',
                title: '@general:terms.validation.regex',
                groupId: 'validation',
                options: {
                    sort: { enabled: false },
                    filter: { advance: { enabled: false }, inline: { enabled: false } },
                },
                schema: {
                    dataType: 'string',
                    interface: {
                        type: AXPWidgetsCatalog.text,
                        options: {
                            placeholder: '^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$'
                        }
                    },
                },
            },
            {
                name: 'placeholder',
                title: '@general:terms.placeholder',
                groupId: 'validation',
                options: {
                    sort: { enabled: false },
                    filter: { advance: { enabled: false }, inline: { enabled: false } },
                },
                schema: {
                    dataType: 'string',
                    interface: {
                        type: AXPWidgetsCatalog.text,
                        options: {
                            placeholder: 'user@example.com'
                        }
                    },
                },
            },
        ],
        columns: [
            { name: 'title' },
            { name: 'validationRegex' },
            { name: 'placeholder' },
        ],
        commands: {
            create: {
                execute: async (data) => {
                    const res = await dataService.insertOne(data);
                    return { id: res };
                },
            },
            delete: {
                execute: async (id) => {
                    return await dataService.deleteOne(id);
                },
            },
            update: {
                execute: async (data) => {
                    return await dataService.updateOne(data.id, data);
                },
            },
        },
        queries: {
            byKey: {
                execute: async (id) => {
                    return await dataService.getOne(id);
                },
                type: AXPEntityQueryType.Single,
            },
            list: {
                execute: async (e) => {
                    return await dataService.query(e);
                },
                type: AXPEntityQueryType.List,
            },
        },
        interfaces: {
            master: {
                create: {
                    sections: [
                        { id: 'basic-info' },
                        { id: 'validation' },
                    ],
                    properties: [
                        { name: 'title', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },
                        { name: 'validationRegex', layout: { positions: { lg: { colSpan: 6, order: 2 } } } },
                        { name: 'placeholder', layout: { positions: { lg: { colSpan: 6, order: 3 } } } },
                    ],
                },
                update: {
                    sections: [
                        { id: 'basic-info' },
                        { id: 'validation' },
                    ],
                    properties: [
                        { name: 'title', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },
                        { name: 'validationRegex', layout: { positions: { lg: { colSpan: 6, order: 2 } } } },
                        { name: 'placeholder', layout: { positions: { lg: { colSpan: 6, order: 3 } } } },
                    ],
                },
                single: {
                    title: '{{title}}',
                    sections: [
                        { id: 'basic-info' },
                        { id: 'validation' },
                    ],
                    properties: [
                        { name: 'title', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },
                        { name: 'validationRegex', layout: { positions: { lg: { colSpan: 6, order: 2 } } } },
                        { name: 'placeholder', layout: { positions: { lg: { colSpan: 6, order: 3 } } } },
                    ],
                    actions: [
                        ...entityMasterRecordActions()
                    ],
                },
                list: {
                    actions: [
                        ...entityMasterCrudActions()
                    ],
                    views: [createAllQueryView({ sorts: [{ name: 'title', dir: 'asc' }] })],
                },
            },
        },
    };
    return entityDef;
}

var contactMethodType_entity = /*#__PURE__*/Object.freeze({
    __proto__: null,
    contactMethodTypeFactory: contactMethodTypeFactory
});

class AXMContactMethodService extends AXMEntityCrudServiceImpl {
}
class AXMContactMethodServiceImpl extends AXMContactMethodService {
    constructor() {
        super(`${RootConfig.module.name}.${RootConfig.entities.contactMethod.name}`);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMContactMethodServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMContactMethodServiceImpl }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMContactMethodServiceImpl, decorators: [{
            type: Injectable
        }], ctorParameters: () => [] });

// Note: contact-method.entity.ts will reference contactMethodType lookup

class AXMEmergencyContactService extends AXMEntityCrudServiceImpl {
}
class AXMEmergencyContactServiceImpl extends AXMEmergencyContactService {
    constructor() {
        super(`${RootConfig.module.name}.${RootConfig.entities.emergencyContact.name}`);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMEmergencyContactServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMEmergencyContactServiceImpl }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMEmergencyContactServiceImpl, decorators: [{
            type: Injectable
        }], ctorParameters: () => [] });

class AXMContactMethodTypeEntityModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMContactMethodTypeEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.4", ngImport: i0, type: AXMContactMethodTypeEntityModule }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMContactMethodTypeEntityModule, providers: [
            {
                provide: AXMContactMethodTypeService,
                useClass: AXMContactMethodTypeServiceImpl,
            },
        ] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMContactMethodTypeEntityModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [],
                    exports: [],
                    declarations: [],
                    providers: [
                        {
                            provide: AXMContactMethodTypeService,
                            useClass: AXMContactMethodTypeServiceImpl,
                        },
                    ],
                }]
        }] });

class AXMContactMethodEntityModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMContactMethodEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.4", ngImport: i0, type: AXMContactMethodEntityModule }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMContactMethodEntityModule, providers: [
            {
                provide: AXMContactMethodService,
                useClass: AXMContactMethodServiceImpl,
            },
        ] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMContactMethodEntityModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [],
                    exports: [],
                    declarations: [],
                    providers: [
                        {
                            provide: AXMContactMethodService,
                            useClass: AXMContactMethodServiceImpl,
                        },
                    ],
                }]
        }] });

class AXMEmergencyContactEntityModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMEmergencyContactEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.4", ngImport: i0, type: AXMEmergencyContactEntityModule }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMEmergencyContactEntityModule, providers: [
            {
                provide: AXMEmergencyContactService,
                useClass: AXMEmergencyContactServiceImpl,
            },
        ] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMEmergencyContactEntityModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [],
                    exports: [],
                    declarations: [],
                    providers: [
                        {
                            provide: AXMEmergencyContactService,
                            useClass: AXMEmergencyContactServiceImpl,
                        },
                    ],
                }]
        }] });

// Entity Services

class AXMContactManagementEntityProvider {
    constructor() {
        this.injector = inject(Injector);
    }
    preload() {
        const module = RootConfig.module.name;
        return Array.from(Object.values(RootConfig.entities)).map((entity) => ({
            module: module,
            entity: entity.name,
        }));
    }
    async get(moduleName, entityName) {
        if (moduleName == RootConfig.module.name) {
            switch (entityName) {
                case RootConfig.entities.contactMethodType.name:
                    return (await Promise.resolve().then(function () { return contactMethodType_entity; })).contactMethodTypeFactory(this.injector);
                case RootConfig.entities.contactMethod.name:
                    return (await import('./acorex-modules-contact-management-contact-method.entity-DM2VGu-z.mjs')).contactMethodFactory(this.injector);
                case RootConfig.entities.emergencyContact.name:
                    return (await import('./acorex-modules-contact-management-emergency-contact.entity-ZaJm8D5Q.mjs')).emergencyContactFactory(this.injector);
            }
        }
        return null;
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMContactManagementEntityProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMContactManagementEntityProvider }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMContactManagementEntityProvider, decorators: [{
            type: Injectable
        }] });

const AXPContactManagementMenuKeys = {
    Root: 'contact-management:menu',
    ContactMethodTypes: 'contact-management:menu:contact-method-types',
    EmergencyContacts: 'contact-management:menu:emergency-contacts',
    EmergencyContactsPage: 'contact-management:page:emergency-contacts',
};

class AXMContactManagementMenuProvider {
    constructor() {
        this.entityService = inject(AXPEntityService);
        this.sessionService = inject(AXPSessionService);
    }
    async provide(context) {
        const module = RootConfig.module;
        context.addItems([
            {
                name: AXPContactManagementMenuKeys.Root,
                priority: 9002,
                text: '@contact-management:root-menu',
                icon: module.icon,
                children: [
                    {
                        name: AXPContactManagementMenuKeys.ContactMethodTypes,
                        text: '@contact-management:contact-method-type.plural-title',
                        path: this.entityService.createPath(module.name, RootConfig.entities.contactMethodType.name),
                        icon: RootConfig.entities.contactMethodType.icon,
                        priority: 5,
                    },
                    {
                        name: 'contact-management:menu:divider-1',
                        text: '',
                        type: 'break',
                        priority: 10,
                    },
                    {
                        name: AXPContactManagementMenuKeys.EmergencyContacts,
                        text: '@contact-management:emergency-contact.plural-title',
                        path: this.entityService.createPath(module.name, RootConfig.entities.emergencyContact.name),
                        icon: RootConfig.entities.emergencyContact.icon,
                        priority: 12,
                    },
                    {
                        name: AXPContactManagementMenuKeys.EmergencyContactsPage,
                        text: '@contact-management:emergency-contact.page.title',
                        path: `${this.sessionService.application?.name}/emergency-contacts`,
                        icon: 'fa-light fa-phone-rotary',
                        priority: 13,
                    },
                ],
            },
        ]);
    }
}

class AXMContactManagementSearchCommandProvider extends AXPSearchCommandProvider {
    constructor() {
        super(...arguments);
        this.commands = [
        // Commands will be added here following the correct pattern
        ];
    }
}

class AXMContactManagementModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMContactManagementModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.4", ngImport: i0, type: AXMContactManagementModule, imports: [CommonModule,
            // Entity Modules
            AXMContactMethodTypeEntityModule,
            AXMContactMethodEntityModule,
            AXMEmergencyContactEntityModule, i1.RouterModule] }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMContactManagementModule, providers: [
            // Entity Provider
            {
                provide: AXP_ENTITY_DEFINITION_LOADER,
                useClass: AXMContactManagementEntityProvider,
                multi: true,
            },
            // Menu Provider
            {
                provide: AXP_MENU_PROVIDER,
                useClass: AXMContactManagementMenuProvider,
                multi: true,
            },
            // Search Command Provider
            {
                provide: AXP_SEARCH_PROVIDER,
                useClass: AXMContactManagementSearchCommandProvider,
                multi: true,
            },
            // Permission Provider
            {
                provide: AXP_PERMISSION_DEFINITION_PROVIDER,
                useFactory: async () => {
                    const injector = inject(Injector);
                    const provider = (await Promise.resolve().then(function () { return permissionDefinition_provider; })).AXMPermissionDefinitionProvider;
                    return new provider(injector);
                },
                multi: true,
            },
        ], imports: [CommonModule,
            // Entity Modules
            AXMContactMethodTypeEntityModule,
            AXMContactMethodEntityModule,
            AXMEmergencyContactEntityModule,
            RouterModule.forChild([{
                    path: ':app/emergency-contacts',
                    component: AXPRootLayoutComponent,
                    children: [
                        {
                            path: '',
                            loadComponent: () => Promise.resolve().then(function () { return emergencyContactsPage_component; }).then(m => m.AXMEmergencyContactsPageComponent)
                        }
                    ]
                }
            ])] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMContactManagementModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [
                        CommonModule,
                        // Entity Modules
                        AXMContactMethodTypeEntityModule,
                        AXMContactMethodEntityModule,
                        AXMEmergencyContactEntityModule,
                        RouterModule.forChild([{
                                path: ':app/emergency-contacts',
                                component: AXPRootLayoutComponent,
                                children: [
                                    {
                                        path: '',
                                        loadComponent: () => Promise.resolve().then(function () { return emergencyContactsPage_component; }).then(m => m.AXMEmergencyContactsPageComponent)
                                    }
                                ]
                            }
                        ]),
                    ],
                    providers: [
                        // Entity Provider
                        {
                            provide: AXP_ENTITY_DEFINITION_LOADER,
                            useClass: AXMContactManagementEntityProvider,
                            multi: true,
                        },
                        // Menu Provider
                        {
                            provide: AXP_MENU_PROVIDER,
                            useClass: AXMContactManagementMenuProvider,
                            multi: true,
                        },
                        // Search Command Provider
                        {
                            provide: AXP_SEARCH_PROVIDER,
                            useClass: AXMContactManagementSearchCommandProvider,
                            multi: true,
                        },
                        // Permission Provider
                        {
                            provide: AXP_PERMISSION_DEFINITION_PROVIDER,
                            useFactory: async () => {
                                const injector = inject(Injector);
                                const provider = (await Promise.resolve().then(function () { return permissionDefinition_provider; })).AXMPermissionDefinitionProvider;
                                return new provider(injector);
                            },
                            multi: true,
                        },
                    ],
                }]
        }] });

const moduleKey = RootConfig.module.name;
const entitiesKey = RootConfig.entities;
const manageKey = AXPSystemActionType.Manage;
const viewKey = AXPSystemActionType.View;
const updateKey = AXPSystemActionType.Update;
const deleteKey = AXPSystemActionType.Delete;
const createKey = AXPSystemActionType.Create;
const AXMPermissionsKeys = {
    ContactManagement: {
        Management: `${moduleKey}:${manageKey}`,
        ContactMethodTypes: {
            Management: `${moduleKey}:${entitiesKey.contactMethodType.name}:${manageKey}`,
            View: `${moduleKey}:${entitiesKey.contactMethodType.name}:${viewKey}`,
            Edit: `${moduleKey}:${entitiesKey.contactMethodType.name}:${updateKey}`,
            Delete: `${moduleKey}:${entitiesKey.contactMethodType.name}:${deleteKey}`,
            Create: `${moduleKey}:${entitiesKey.contactMethodType.name}:${createKey}`,
        },
        EmergencyContacts: {
            Management: `${moduleKey}:${entitiesKey.emergencyContact.name}:${manageKey}`,
            View: `${moduleKey}:${entitiesKey.emergencyContact.name}:${viewKey}`,
            Edit: `${moduleKey}:${entitiesKey.emergencyContact.name}:${updateKey}`,
            Delete: `${moduleKey}:${entitiesKey.emergencyContact.name}:${deleteKey}`,
            Create: `${moduleKey}:${entitiesKey.emergencyContact.name}:${createKey}`,
        },
    },
};

class AXMPermissionDefinitionProvider {
    constructor(injector) {
        this.injector = injector;
        this.translateService = this.injector.get(AXTranslationService);
    }
    async define(context) {
        const trans = async (key) => await this.translateService.translateAsync(key);
        const keys = AXMPermissionsKeys.ContactManagement;
        context.addGroup(keys.Management, await trans(RootConfig.module.title))
            // Contact Method Types Management
            .addPermission(keys.ContactMethodTypes.Management, await trans(RootConfig.entities.contactMethodType.title))
            .addChild(keys.ContactMethodTypes.View, await trans('@general:actions.view.permission'))
            .addChild(keys.ContactMethodTypes.Edit, await trans('@general:actions.edit.permission'))
            .addChild(keys.ContactMethodTypes.Delete, await trans('@general:actions.delete.permission'))
            .addChild(keys.ContactMethodTypes.Create, await trans('@general:actions.create.permission'))
            .endPermission()
            // Emergency Contacts Management
            .addPermission(keys.EmergencyContacts.Management, await trans(RootConfig.entities.emergencyContact.title))
            .addChild(keys.EmergencyContacts.View, await trans('@general:actions.view.permission'))
            .addChild(keys.EmergencyContacts.Edit, await trans('@general:actions.edit.permission'))
            .addChild(keys.EmergencyContacts.Delete, await trans('@general:actions.delete.permission'))
            .addChild(keys.EmergencyContacts.Create, await trans('@general:actions.create.permission'))
            .endPermission()
            .endGroup();
    }
}

var permissionDefinition_provider = /*#__PURE__*/Object.freeze({
    __proto__: null,
    AXMPermissionDefinitionProvider: AXMPermissionDefinitionProvider
});

class AXMEmergencyContactItemComponent {
    constructor() {
        this.contact = input.required(...(ngDevMode ? [{ debugName: "contact" }] : []));
        this.expanded = signal(false, ...(ngDevMode ? [{ debugName: "expanded" }] : []));
        this.categoryIcon = computed(() => {
            const c = this.contact()?.categories?.[0];
            return c?.icon ?? 'fa-light fa-circle-info';
        }, ...(ngDevMode ? [{ debugName: "categoryIcon" }] : []));
        this.categoryColor = computed(() => {
            const c = this.contact()?.categories?.[0];
            return c?.color ?? 'fa-light fa-circle-info';
        }, ...(ngDevMode ? [{ debugName: "categoryColor" }] : []));
        this.messageDisabled = computed(() => {
            const c = this.contact();
            const smsNumber = c.textNumber || c.phoneNumber;
            return !(c.isTextCapable && !!smsNumber);
        }, ...(ngDevMode ? [{ debugName: "messageDisabled" }] : []));
        this.callDisabled = computed(() => !this.contact().phoneNumber, ...(ngDevMode ? [{ debugName: "callDisabled" }] : []));
        this.coverageText = computed(() => {
            const c = this.contact();
            const coverage = [];
            if (c.isNational)
                coverage.push('National');
            if (c.isRegional)
                coverage.push('Regional');
            if (c.isLocal)
                coverage.push('Local');
            return coverage.join(', ');
        }, ...(ngDevMode ? [{ debugName: "coverageText" }] : []));
        this.capabilitiesText = computed(() => {
            const c = this.contact();
            const caps = [];
            if (c.isTextCapable)
                caps.push('Text');
            if (c.isVideoCallCapable)
                caps.push('Video');
            if (!caps.length)
                return 'Voice Only';
            return caps.join(' ');
        }, ...(ngDevMode ? [{ debugName: "capabilitiesText" }] : []));
    }
    toggleExpanded() {
        this.expanded.update((v) => !v);
    }
    handleCall() {
        const number = this.contact().phoneNumber;
        if (number) {
            window.open(`tel:${number}`, '_self');
        }
    }
    handleText() {
        const c = this.contact();
        const smsNumber = c.textNumber || c.phoneNumber;
        if (c.isTextCapable && smsNumber) {
            window.open(`sms:${smsNumber}`, '_self');
        }
    }
    visitWebsite() {
        const url = this.contact().website;
        if (url) {
            window.open(url, '_blank');
        }
    }
    async copyInfo() {
        const c = this.contact();
        const info = {
            name: c.name,
            phone: c.phoneNumber,
            text: c.textNumber,
            email: c.email,
            website: c.website,
            availability: c.availability,
            coverage: this.coverageText(),
            capabilities: this.capabilitiesText(),
        };
        try {
            if (navigator?.clipboard) {
                await navigator.clipboard.writeText(JSON.stringify(info, null, 2));
            }
        }
        catch {
            // ignore
        }
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMEmergencyContactItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: AXMEmergencyContactItemComponent, isStandalone: true, selector: "axm-emergency-contact-item", inputs: { contact: { classPropertyName: "contact", publicName: "contact", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "class": "\"ax-block ax-rounded-lg ax-border ax-lightest-surface dark:ax-darker-surface ax-shadow-sm\"" } }, ngImport: i0, template: "<div class=\"ax-space-y-3 ax-py-4\">\n  <!-- Header -->\n  <div class=\"ax-flex ax-items-center ax-justify-center ax-gap-3 ax-flex-col\">\n    <div class=\"ax-flex ax-items-start ax-gap-3 ax-min-w-0 ax-px-4 ax-w-full\">\n      <div\n        class=\"ax-flex ax-border ax-items-center ax-justify-center ax-w-10 ax-h-10 ax-rounded-md ax-lighter-surface dark:ax-surface\"\n      >\n        <ax-icon [icon]=\"categoryIcon()\" [style.color]=\"categoryColor()\"></ax-icon>\n      </div>\n      <div class=\"ax-min-w-0\">\n        <div class=\"ax-text-lg ax-font-semibold ax-text-default ax-truncate\">{{ contact().name }}</div>\n        @if (contact().shortName) {\n          <div class=\"ax-text-sm ax-text-muted ax-truncate\">{{ contact().shortName }}</div>\n        }\n      </div>\n    </div>\n    <div class=\"ax-w-full ax-border-t ax-border-lighter dark:ax-border-darker\"></div>\n    <div class=\"ax-flex ax-items-center ax-justify-between ax-sm ax-w-full ax-px-4\">\n      <div class=\"ax-flex ax-items-center ax-gap-2\">\n        <ax-button [look]=\"'blank'\" (onClick)=\"handleText()\" [disabled]=\"messageDisabled()\">\n          <ax-icon icon=\"fa-light fa-message\" class=\"ax-text-primary\"></ax-icon>\n        </ax-button>\n        <ax-button [look]=\"'blank'\" (onClick)=\"handleCall()\" [disabled]=\"callDisabled()\">\n          <ax-icon icon=\"fa-light fa-phone\" class=\"ax-text-primary\"></ax-icon>\n        </ax-button>\n      </div>\n      <ax-button [look]=\"'blank'\" [text]=\"'More details'\" (onClick)=\"toggleExpanded()\">\n        <ax-icon [icon]=\"expanded() ? 'fa-light fa-chevron-up' : 'fa-light fa-chevron-down'\"></ax-icon>\n      </ax-button>\n    </div>\n  </div>\n\n  <!-- Details -->\n  @if (expanded()) {\n    <div class=\"ax-px-6 ax-border-t ax-space-y-4 ax-pt-4 ax-border-lighter dark:ax-border-darker\">\n      <!-- Rowed details; only render when data exists -->\n      <div class=\"ax-grid ax-grid-cols-1 ax-gap-3\">\n        <div class=\"ax-flex ax-items-center ax-gap-2\" *ngIf=\"true\">\n          <ax-icon icon=\"fa-light fa-building\"></ax-icon>\n          <div class=\"ax-text-sm ax-text-muted\">Company Name</div>\n          <div class=\"ax-flex-1 ax-text-sm ax-text-default ax-text-right\">{{ contact().name }}</div>\n        </div>\n\n        @if (contact().phoneNumber || contact().shortName) {\n          <div class=\"ax-flex ax-items-center ax-gap-2\">\n            <ax-icon icon=\"fa-light fa-phone\"></ax-icon>\n            <div class=\"ax-text-sm ax-text-muted\">Phone</div>\n            <div class=\"ax-flex-1 ax-text-sm ax-text-default ax-text-right\">\n              {{ contact().shortName || contact().phoneNumber }}\n            </div>\n          </div>\n        }\n\n        @if (contact().email) {\n          <div class=\"ax-flex ax-items-center ax-gap-2\">\n            <ax-icon icon=\"fa-light fa-envelope\"></ax-icon>\n            <div class=\"ax-text-sm ax-text-muted\">Email</div>\n            <div class=\"ax-flex-1 ax-text-sm ax-text-default ax-text-right\">{{ contact().email }}</div>\n          </div>\n        }\n\n        @if (contact().website) {\n          <div class=\"ax-flex ax-items-center ax-gap-2\">\n            <ax-icon icon=\"fa-light fa-globe\"></ax-icon>\n            <div class=\"ax-text-sm ax-text-muted\">Website</div>\n            <div class=\"ax-flex-1 ax-text-sm ax-text-right\">\n              <a class=\"ax-text-accent ax-hover:underline\" [href]=\"contact().website\" target=\"_blank\">{{\n                contact().website\n              }}</a>\n            </div>\n          </div>\n        }\n\n        @if (coverageText()) {\n          <div class=\"ax-flex ax-items-center ax-gap-2\">\n            <ax-icon icon=\"fa-light fa-location-dot\"></ax-icon>\n            <div class=\"ax-text-sm ax-text-muted\">Coverage</div>\n            <div class=\"ax-flex-1 ax-text-sm ax-text-default ax-text-right\">{{ coverageText() }}</div>\n          </div>\n        }\n\n        <div class=\"ax-flex ax-items-center ax-gap-2\">\n          <ax-icon icon=\"fa-light fa-wand-magic-sparkles\"></ax-icon>\n          <div class=\"ax-text-sm ax-text-muted\">Capabilities</div>\n          <div class=\"ax-flex-1 ax-text-sm ax-text-default ax-text-right\">{{ capabilitiesText() }}</div>\n        </div>\n\n        @if (contact().availability) {\n          <div class=\"ax-flex ax-items-center ax-gap-2\">\n            <ax-icon icon=\"fa-light fa-clock\"></ax-icon>\n            <div class=\"ax-text-sm ax-text-muted\">Availability</div>\n            <div class=\"ax-flex-1 ax-text-sm ax-text-default ax-text-right\">{{ contact().availability }}</div>\n          </div>\n        }\n\n        @if (contact().lastVerified) {\n          <div class=\"ax-flex ax-items-center ax-gap-2\">\n            <ax-icon icon=\"fa-light fa-badge-check\"></ax-icon>\n            <div class=\"ax-text-sm ax-text-muted\">Last Verified</div>\n            <div class=\"ax-flex-1 ax-text-sm ax-text-default ax-text-right\">\n              {{ contact().lastVerified | date }}\n            </div>\n          </div>\n        }\n      </div>\n\n      <!-- Footer actions -->\n      <div class=\"ax-flex ax-justify-end ax-gap-2\">\n        <ax-button [look]=\"'blank'\" (onClick)=\"copyInfo()\" [text]=\"'Copy Info'\">\n          <ax-icon icon=\"fa-light fa-copy\"></ax-icon>\n        </ax-button>\n        @if (contact().website) {\n          <ax-button [look]=\"'blank'\" [text]=\"'Check Website'\" (onClick)=\"visitWebsite()\">\n            <ax-icon icon=\"fa-light fa-arrow-up-right-from-square\"></ax-icon>\n          </ax-button>\n        }\n      </div>\n    </div>\n  }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2.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: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMEmergencyContactItemComponent, decorators: [{
            type: Component,
            args: [{ selector: 'axm-emergency-contact-item', changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, AXButtonModule, AXDecoratorModule], host: {
                        '[class]': '"ax-block ax-rounded-lg ax-border ax-lightest-surface dark:ax-darker-surface ax-shadow-sm"',
                    }, template: "<div class=\"ax-space-y-3 ax-py-4\">\n  <!-- Header -->\n  <div class=\"ax-flex ax-items-center ax-justify-center ax-gap-3 ax-flex-col\">\n    <div class=\"ax-flex ax-items-start ax-gap-3 ax-min-w-0 ax-px-4 ax-w-full\">\n      <div\n        class=\"ax-flex ax-border ax-items-center ax-justify-center ax-w-10 ax-h-10 ax-rounded-md ax-lighter-surface dark:ax-surface\"\n      >\n        <ax-icon [icon]=\"categoryIcon()\" [style.color]=\"categoryColor()\"></ax-icon>\n      </div>\n      <div class=\"ax-min-w-0\">\n        <div class=\"ax-text-lg ax-font-semibold ax-text-default ax-truncate\">{{ contact().name }}</div>\n        @if (contact().shortName) {\n          <div class=\"ax-text-sm ax-text-muted ax-truncate\">{{ contact().shortName }}</div>\n        }\n      </div>\n    </div>\n    <div class=\"ax-w-full ax-border-t ax-border-lighter dark:ax-border-darker\"></div>\n    <div class=\"ax-flex ax-items-center ax-justify-between ax-sm ax-w-full ax-px-4\">\n      <div class=\"ax-flex ax-items-center ax-gap-2\">\n        <ax-button [look]=\"'blank'\" (onClick)=\"handleText()\" [disabled]=\"messageDisabled()\">\n          <ax-icon icon=\"fa-light fa-message\" class=\"ax-text-primary\"></ax-icon>\n        </ax-button>\n        <ax-button [look]=\"'blank'\" (onClick)=\"handleCall()\" [disabled]=\"callDisabled()\">\n          <ax-icon icon=\"fa-light fa-phone\" class=\"ax-text-primary\"></ax-icon>\n        </ax-button>\n      </div>\n      <ax-button [look]=\"'blank'\" [text]=\"'More details'\" (onClick)=\"toggleExpanded()\">\n        <ax-icon [icon]=\"expanded() ? 'fa-light fa-chevron-up' : 'fa-light fa-chevron-down'\"></ax-icon>\n      </ax-button>\n    </div>\n  </div>\n\n  <!-- Details -->\n  @if (expanded()) {\n    <div class=\"ax-px-6 ax-border-t ax-space-y-4 ax-pt-4 ax-border-lighter dark:ax-border-darker\">\n      <!-- Rowed details; only render when data exists -->\n      <div class=\"ax-grid ax-grid-cols-1 ax-gap-3\">\n        <div class=\"ax-flex ax-items-center ax-gap-2\" *ngIf=\"true\">\n          <ax-icon icon=\"fa-light fa-building\"></ax-icon>\n          <div class=\"ax-text-sm ax-text-muted\">Company Name</div>\n          <div class=\"ax-flex-1 ax-text-sm ax-text-default ax-text-right\">{{ contact().name }}</div>\n        </div>\n\n        @if (contact().phoneNumber || contact().shortName) {\n          <div class=\"ax-flex ax-items-center ax-gap-2\">\n            <ax-icon icon=\"fa-light fa-phone\"></ax-icon>\n            <div class=\"ax-text-sm ax-text-muted\">Phone</div>\n            <div class=\"ax-flex-1 ax-text-sm ax-text-default ax-text-right\">\n              {{ contact().shortName || contact().phoneNumber }}\n            </div>\n          </div>\n        }\n\n        @if (contact().email) {\n          <div class=\"ax-flex ax-items-center ax-gap-2\">\n            <ax-icon icon=\"fa-light fa-envelope\"></ax-icon>\n            <div class=\"ax-text-sm ax-text-muted\">Email</div>\n            <div class=\"ax-flex-1 ax-text-sm ax-text-default ax-text-right\">{{ contact().email }}</div>\n          </div>\n        }\n\n        @if (contact().website) {\n          <div class=\"ax-flex ax-items-center ax-gap-2\">\n            <ax-icon icon=\"fa-light fa-globe\"></ax-icon>\n            <div class=\"ax-text-sm ax-text-muted\">Website</div>\n            <div class=\"ax-flex-1 ax-text-sm ax-text-right\">\n              <a class=\"ax-text-accent ax-hover:underline\" [href]=\"contact().website\" target=\"_blank\">{{\n                contact().website\n              }}</a>\n            </div>\n          </div>\n        }\n\n        @if (coverageText()) {\n          <div class=\"ax-flex ax-items-center ax-gap-2\">\n            <ax-icon icon=\"fa-light fa-location-dot\"></ax-icon>\n            <div class=\"ax-text-sm ax-text-muted\">Coverage</div>\n            <div class=\"ax-flex-1 ax-text-sm ax-text-default ax-text-right\">{{ coverageText() }}</div>\n          </div>\n        }\n\n        <div class=\"ax-flex ax-items-center ax-gap-2\">\n          <ax-icon icon=\"fa-light fa-wand-magic-sparkles\"></ax-icon>\n          <div class=\"ax-text-sm ax-text-muted\">Capabilities</div>\n          <div class=\"ax-flex-1 ax-text-sm ax-text-default ax-text-right\">{{ capabilitiesText() }}</div>\n        </div>\n\n        @if (contact().availability) {\n          <div class=\"ax-flex ax-items-center ax-gap-2\">\n            <ax-icon icon=\"fa-light fa-clock\"></ax-icon>\n            <div class=\"ax-text-sm ax-text-muted\">Availability</div>\n            <div class=\"ax-flex-1 ax-text-sm ax-text-default ax-text-right\">{{ contact().availability }}</div>\n          </div>\n        }\n\n        @if (contact().lastVerified) {\n          <div class=\"ax-flex ax-items-center ax-gap-2\">\n            <ax-icon icon=\"fa-light fa-badge-check\"></ax-icon>\n            <div class=\"ax-text-sm ax-text-muted\">Last Verified</div>\n            <div class=\"ax-flex-1 ax-text-sm ax-text-default ax-text-right\">\n              {{ contact().lastVerified | date }}\n            </div>\n          </div>\n        }\n      </div>\n\n      <!-- Footer actions -->\n      <div class=\"ax-flex ax-justify-end ax-gap-2\">\n        <ax-button [look]=\"'blank'\" (onClick)=\"copyInfo()\" [text]=\"'Copy Info'\">\n          <ax-icon icon=\"fa-light fa-copy\"></ax-icon>\n        </ax-button>\n        @if (contact().website) {\n          <ax-button [look]=\"'blank'\" [text]=\"'Check Website'\" (onClick)=\"visitWebsite()\">\n            <ax-icon icon=\"fa-light fa-arrow-up-right-from-square\"></ax-icon>\n          </ax-button>\n        }\n      </div>\n    </div>\n  }\n</div>\n" }]
        }] });

class AXMEmergencyContactsPageComponent extends AXPPageLayoutBaseComponent {
    constructor() {
        super(...arguments);
        //#region ----   Services & Dependencies   ----
        this.emergencyContactService = inject(AXMEmergencyContactService);
        //#endregion
        //#region ----   Class Properties   ----
        this.allContacts = signal([], ...(ngDevMode ? [{ debugName: "allContacts" }] : []));
        this.loading = signal(false, ...(ngDevMode ? [{ debugName: "loading" }] : []));
        this.isLargeScreen = signal(true, ...(ngDevMode ? [{ debugName: "isLargeScreen" }] : []));
        this.expandedContactIds = signal(new Set(), ...(ngDevMode ? [{ debugName: "expandedContactIds" }] : []));
        //#endregion
        //#region ----   Computed Properties   ----
        this.quickDialContacts = computed(() => this.allContacts()
            .filter((contact) => contact.isQuickDial && contact.isActive)
            .sort((a, b) => (a.priority || 0) - (b.priority || 0)), ...(ngDevMode ? [{ debugName: "quickDialContacts" }] : []));
        this.dashboardContacts = computed(() => this.allContacts()
            .filter((contact) => contact.showOnDashboard && contact.isActive && !contact.isQuickDial)
            .sort((a, b) => (a.priority || 0) - (b.priority || 0)), ...(ngDevMode ? [{ debugName: "dashboardContacts" }] : []));
        this.allActiveContacts = computed(() => this.allContacts()
            .filter((contact) => contact.isActive)
            .sort((a, b) => (a.priority || 0) - (b.priority || 0)), ...(ngDevMode ? [{ debugName: "allActiveContacts" }] : []));
        // Fallback: show all contacts if filtered lists are empty
        this.displayContacts = computed(() => {
            const allContacts = this.allContacts();
            // If we have contacts but none are marked as active, show all
            if (allContacts.length > 0 && this.allActiveContacts().length === 0) {
                return allContacts.sort((a, b) => (a.priority || 0) - (b.priority || 0));
            }
            return this.allActiveContacts();
        }, ...(ngDevMode ? [{ debugName: "displayContacts" }] : []));
    }
    //#endregion
    onResize() {
        this.checkScreenSize();
    }
    checkScreenSize() {
        this.isLargeScreen.set(window.innerWidth >= 768);
    }
    //#region ----   Lifecycle Methods   ----
    async ngOnInit() {
        super.ngOnInit();
        this.checkScreenSize();
        await this.loadEmergencyContacts();
    }
    //#endregion
    //#region ----   Data Loading   ----
    async loadEmergencyContacts() {
        this.loading.set(true);
        try {
            const result = await this.emergencyContactService.query({
                skip: 0,
                take: 1000,
                sort: [{ field: 'priority', dir: 'asc' }],
            });
            this.allContacts.set(result.items);
        }
        catch (error) {
            console.error('Failed to load emergency contacts:', error);
        }
        finally {
            this.loading.set(false);
        }
    }
    //#endregion
    //#region ----   UI Handlers   ----
    toggleExpanded(contactId) {
        this.expandedContactIds.update((current) => {
            const next = new Set(current);
            if (next.has(contactId)) {
                next.delete(contactId);
            }
            else {
                next.add(contactId);
            }
            return next;
        });
    }
    isExpanded(contactId) {
        return this.expandedContactIds().has(contactId);
    }
    handleCallContact(contact) {
        if (contact.phoneNumber) {
            window.open(`tel:${contact.phoneNumber}`, '_self');
        }
    }
    handleTextContact(contact) {
        const textNumber = contact.textNumber || contact.phoneNumber;
        if (textNumber) {
            window.open(`sms:${textNumber}`, '_self');
        }
    }
    handleVisitWebsite(contact) {
        if (contact.website) {
            window.open(contact.website, '_blank');
        }
    }
    async handleCopyNumber(contact) {
        if (contact.phoneNumber && navigator.clipboard) {
            try {
                await navigator.clipboard.writeText(contact.phoneNumber);
                // You could add a toast notification here
            }
            catch (error) {
                console.error('Failed to copy number:', error);
            }
        }
    }
    handleRefresh() {
        this.loadEmergencyContacts();
    }
    getPrimaryAction(contact) {
        if (contact.isTextCapable && !!contact.textNumber && !contact.requiresConfirmation) {
            return 'text';
        }
        return 'call';
    }
    performPrimaryAction(contact) {
        const action = this.getPrimaryAction(contact);
        if (action === 'text') {
            this.handleTextContact(contact);
        }
        else {
            this.handleCallContact(contact);
        }
    }
    getPrimaryActionLabel(contact) {
        return this.getPrimaryAction(contact) === 'text' ? 'Text Now' : 'Call Now';
    }
    getPrimaryActionColor(contact) {
        return this.getPrimaryAction(contact) === 'text' ? 'primary' : 'danger';
    }
    //#endregion
    //#region ----   Utility Methods   ----
    getCoverageText(contact) {
        const coverage = [];
        if (contact.isNational)
            coverage.push('National');
        if (contact.isRegional)
            coverage.push('Regional');
        if (contact.isLocal)
            coverage.push('Local');
        return coverage.join(', ') || 'Unknown';
    }
    getCapabilitiesText(contact) {
        const capabilities = [];
        if (contact.isTextCapable)
            capabilities.push('Text');
        if (contact.isVideoCallCapable)
            capabilities.push('Video');
        return capabilities.join(', ') || 'Voice Only';
    }
    getPriorityColor(priority) {
        if (priority <= 1)
            return 'danger';
        if (priority <= 3)
            return 'warning';
        if (priority <= 5)
            return 'primary';
        return 'secondary';
    }
    //#endregion
    //#region ----   Page Metadata Overrides   ----
    async getPageTitle() {
        return 'Emergency Contacts & Quick Dial';
    }
    async getPageDescription() {
        return 'Access emergency contacts and important numbers quickly';
    }
    async getPageBreadcrumbs() {
        return [
            {
                title: 'Contact Management',
            },
        ];
    }
    async getSecondaryMenuItems() {
        return [
            {
                title: 'Refresh',
                icon: 'fa-light fa-refresh',
                color: 'secondary',
                command: {
                    name: 'refresh',
                },
            },
        ];
    }
    async execute(command) {
        if (command.name === 'refresh') {
            this.handleRefresh();
        }
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMEmergencyContactsPageComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: AXMEmergencyContactsPageComponent, isStandalone: true, selector: "axm-emergency-contacts-page", host: { listeners: { "window:resize": "onResize()" } }, providers: [
            {
                provide: AXPPageLayoutBase,
                useExisting: AXMEmergencyContactsPageComponent,
            },
        ], usesInheritance: true, ngImport: i0, template: "<axp-page-layout *translate=\"let t\">\n  <axp-page-content>\n    <!-- Loading State -->\n    @if (loading()) {\n      <div class=\"ax-flex ax-items-center ax-justify-center ax-py-8\">\n        <ax-loading>Loading emergency contacts...</ax-loading>\n      </div>\n    } @else {\n      <div class=\"ax-space-y-6 ax-p-4\">\n        <!-- Quick Dial Section -->\n        @if (quickDialContacts().length > 0) {\n          <div class=\"ax-mb-8\">\n            <h2 class=\"ax-text-2xl ax-font-semibold ax-mb-4 ax-flex ax-items-center ax-gap-2\">\n              <ax-icon icon=\"fa-light fa-phone-rotary\" class=\"ax-text-danger\"></ax-icon>\n              Quick Dial\n            </h2>\n            <div class=\"ax-grid ax-grid-cols-1 sm:ax-grid-cols-2 lg:ax-grid-cols-3 xl:ax-grid-cols-4 ax-gap-4\">\n              @for (contact of quickDialContacts(); track contact.id) {\n                <axm-emergency-contact-item [contact]=\"contact\"></axm-emergency-contact-item>\n              }\n            </div>\n          </div>\n        }\n\n        <!-- Dashboard Contacts Section -->\n        @if (dashboardContacts().length > 0) {\n          <div class=\"ax-mb-8\">\n            <h2 class=\"ax-text-2xl ax-font-semibold ax-mb-4 ax-flex ax-items-center ax-gap-2\">\n              <ax-icon icon=\"fa-light fa-tachometer-alt\" class=\"ax-text-primary\"></ax-icon>\n              All Emergency Contacts\n            </h2>\n            <div class=\"ax-grid ax-grid-cols-1 sm:ax-grid-cols-2 lg:ax-grid-cols-3 xl:ax-grid-cols-4 ax-gap-4\">\n              @for (contact of dashboardContacts(); track contact.id) {\n                <axm-emergency-contact-item [contact]=\"contact\"></axm-emergency-contact-item>\n              }\n            </div>\n          </div>\n        }\n\n        <!-- Fallback: Show all contacts if no filtered contacts are available -->\n        @if (quickDialContacts().length === 0 && dashboardContacts().length === 0 && displayContacts().length > 0) {\n          <div class=\"ax-mb-8\">\n            <h2 class=\"ax-text-2xl ax-font-semibold ax-mb-4 ax-flex ax-items-center ax-gap-2\">\n              <ax-icon icon=\"fa-light fa-list\" class=\"ax-text-info\"></ax-icon>\n              All Emergency Contacts\n            </h2>\n            <div class=\"ax-grid ax-grid-cols-1 sm:ax-grid-cols-2 lg:ax-grid-cols-3 xl:ax-grid-cols-4 ax-gap-4\">\n              @for (contact of displayContacts(); track contact.id) {\n                <axm-emergency-contact-item [contact]=\"contact\"></axm-emergency-contact-item>\n              }\n            </div>\n          </div>\n        }\n\n        <!-- No Contacts State -->\n        @if (allContacts().length === 0 && !loading()) {\n          <axp-state-message\n            icon=\"fa-light fa-phone-slash\"\n            [title]=\"'@contact-management:no-emergency-contacts.title'\"\n            [description]=\"'@contact-management:no-emergency-contacts.description'\"\n          >\n          </axp-state-message>\n        }\n      </div>\n    }\n  </axp-page-content>\n</axp-page-layout>\n", styles: ["axm-emergency-contacts-page{display:block;width:100%;height:100%}axm-emergency-contacts-page .ax-space-y-6.ax-p-4{max-width:1200px;margin:0 auto;padding-left:1rem;padding-right:1rem}@media (min-width: 768px){axm-emergency-contacts-page .ax-space-y-6.ax-p-4{padding-left:1.5rem;padding-right:1.5rem}}axm-emergency-contacts-page h2{margin-bottom:1.25rem;color:var(--ax-sys-color-primary);border-bottom:1px solid var(--ax-sys-color-border);padding-bottom:.5rem}axm-emergency-contacts-page h2 ax-icon{margin-right:.5rem}@media (min-width: 768px){axm-emergency-contacts-page h2 ax-icon{margin-right:.75rem}}axm-emergency-contacts-page .emergency-contact-quick-dial{position:relative;--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;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));animation-duration:.2s;border:1px solid var(--ax-sys-color-outline-variant);min-height:140px}axm-emergency-contacts-page .emergency-contact-quick-dial:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);transform:translateY(-2px);border-color:var(--priority-color, var(--ax-sys-color-primary))}axm-emergency-contacts-page .emergency-contact-quick-dial h3{color:var(--ax-sys-color-on-surface);margin-bottom:.125rem;font-size:1rem;line-height:1.5rem;font-weight:600}@media (min-width: 768px){axm-emergency-contacts-page .emergency-contact-quick-dial h3{font-size:1.125rem;line-height:1.75rem}}axm-emergency-contacts-page .emergency-contact-quick-dial .ax-button{font-size:.75rem;line-height:1rem;font-weight:500}@media (min-width: 768px){axm-emergency-contacts-page .emergency-contact-quick-dial .ax-button{font-size:.875rem;line-height:1.25rem}}axm-emergency-contacts-page .emergency-contact-quick-dial .ax-button{min-height:30px}axm-emergency-contacts-page .emergency-contact-detailed{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;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));animation-duration:.2s;border:1px solid var(--ax-sys-color-outline-variant)}axm-emergency-contacts-page .emergency-contact-detailed:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);transform:translateY(-1px);border-color:var(--ax-sys-color-primary)}axm-emergency-contacts-page .emergency-contact-detailed h3{color:var(--ax-sys-color-on-surface);font-size:1.125rem;line-height:1.75rem;font-weight:600}@media (min-width: 768px){axm-emergency-contacts-page .emergency-contact-detailed h3{font-size:1.25rem;line-height:1.75rem}}axm-emergency-contacts-page .emergency-contact-detailed ax-icon{flex-shrink:0}@media (min-width: 640px){axm-emergency-contacts-page .emergency-contact-detailed .ax-grid-cols-1.sm\\\\:ax-grid-cols-2>div{min-width:0px}}@media (min-width: 1024px){axm-emergency-contacts-page .emergency-contact-detailed .ax-flex.ax-flex-col.ax-gap-3{position:-webkit-sticky;position:sticky;top:1rem}}axm-emergency-contacts-page ax-loading{margin-left:auto;margin-right:auto}axm-emergency-contacts-page .ax-text-center.ax-py-12 ax-icon{margin-left:auto;margin-right:auto;display:block}axm-emergency-contacts-page ax-badge[data-color=danger]{--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-danger-200),var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-danger-100),var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-danger-800),var(--tw-text-opacity, 1))}axm-emergency-contacts-page ax-badge[data-color=warning]{--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-warning-200),var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-warning-100),var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-warning-800),var(--tw-text-opacity, 1))}axm-emergency-contacts-page ax-badge[data-color=primary]{--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-primary-200),var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-primary-100),var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-primary-800),var(--tw-text-opacity, 1))}axm-emergency-contacts-page ax-badge[data-color=secondary]{--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-secondary-200),var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-secondary-100),var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-secondary-800),var(--tw-text-opacity, 1))}axm-emergency-contacts-page .ax-bg-warning-50 ax-icon{flex-shrink:0}axm-emergency-contacts-page .ax-font-mono{letter-spacing:.025em}@media (min-width: 640px){axm-emergency-contacts-page axp-layout-content .ax-gap-4{gap:1.5rem}}axm-emergency-contacts-page ax-button{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}axm-emergency-contacts-page ax-button:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}axm-emergency-contacts-page ax-button:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}axm-emergency-contacts-page ax-button[data-color=danger]{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}axm-emergency-contacts-page ax-button[data-color=danger]:hover{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}axm-emergency-contacts-page ax-icon.ax-w-4{height:1rem}axm-emergency-contacts-page ax-icon.ax-text-6xl{height:6rem;width:6rem}@media (max-width: 640px){axm-emergency-contacts-page .ax-grid-cols-1 .ax-gap-3{gap:.5rem}axm-emergency-contacts-page .emergency-contact-quick-dial .contact-info-text{font-size:.75rem;line-height:1rem}}@media print{axm-emergency-contacts-page .emergency-contact-quick-dial,axm-emergency-contacts-page .emergency-contact-detailed{break-inside:avoid;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}axm-emergency-contacts-page ax-button{display:none}axm-emergency-contacts-page .ax-bg-warning-50{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}}@media (prefers-contrast: high){axm-emergency-contacts-page .emergency-contact-quick-dial,axm-emergency-contacts-page .emergency-contact-detailed{border-width:2px}axm-emergency-contacts-page ax-badge{border-width:2px}}@media (prefers-reduced-motion: reduce){axm-emergency-contacts-page *{transition-property:none}axm-emergency-contacts-page ax-button:hover,axm-emergency-contacts-page .emergency-contact-quick-dial:hover{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i2$1.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "directive", type: i3$1.AXTranslatorDirective, selector: "[translate]" }, { kind: "ngmodule", type: AXFormatModule }, { 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: AXMEmergencyContactItemComponent, selector: "axm-emergency-contact-item", inputs: ["contact"] }, { kind: "component", type: AXPStateMessageComponent, selector: "axp-state-message", inputs: ["mode", "icon", "title", "description", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMEmergencyContactsPageComponent, decorators: [{
            type: Component,
            args: [{ selector: 'axm-emergency-contacts-page', imports: [
                        CommonModule,
                        AXButtonModule,
                        AXDecoratorModule,
                        AXLoadingModule,
                        AXBadgeModule,
                        AXTranslationModule,
                        AXFormatModule,
                        AXPPageLayoutComponent,
                        AXPThemeLayoutBlockComponent,
                        AXMEmergencyContactItemComponent,
                        AXPStateMessageComponent,
                    ], host: {
                        '(window:resize)': 'onResize()',
                    }, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
                        {
                            provide: AXPPageLayoutBase,
                            useExisting: AXMEmergencyContactsPageComponent,
                        },
                    ], template: "<axp-page-layout *translate=\"let t\">\n  <axp-page-content>\n    <!-- Loading State -->\n    @if (loading()) {\n      <div class=\"ax-flex ax-items-center ax-justify-center ax-py-8\">\n        <ax-loading>Loading emergency contacts...</ax-loading>\n      </div>\n    } @else {\n      <div class=\"ax-space-y-6 ax-p-4\">\n        <!-- Quick Dial Section -->\n        @if (quickDialContacts().length > 0) {\n          <div class=\"ax-mb-8\">\n            <h2 class=\"ax-text-2xl ax-font-semibold ax-mb-4 ax-flex ax-items-center ax-gap-2\">\n              <ax-icon icon=\"fa-light fa-phone-rotary\" class=\"ax-text-danger\"></ax-icon>\n              Quick Dial\n            </h2>\n            <div class=\"ax-grid ax-grid-cols-1 sm:ax-grid-cols-2 lg:ax-grid-cols-3 xl:ax-grid-cols-4 ax-gap-4\">\n              @for (contact of quickDialContacts(); track contact.id) {\n                <axm-emergency-contact-item [contact]=\"contact\"></axm-emergency-contact-item>\n              }\n            </div>\n          </div>\n        }\n\n        <!-- Dashboard Contacts Section -->\n        @if (dashboardContacts().length > 0) {\n          <div class=\"ax-mb-8\">\n            <h2 class=\"ax-text-2xl ax-font-semibold ax-mb-4 ax-flex ax-items-center ax-gap-2\">\n              <ax-icon icon=\"fa-light fa-tachometer-alt\" class=\"ax-text-primary\"></ax-icon>\n              All Emergency Contacts\n            </h2>\n            <div class=\"ax-grid ax-grid-cols-1 sm:ax-grid-cols-2 lg:ax-grid-cols-3 xl:ax-grid-cols-4 ax-gap-4\">\n              @for (contact of dashboardContacts(); track contact.id) {\n                <axm-emergency-contact-item [contact]=\"contact\"></axm-emergency-contact-item>\n              }\n            </div>\n          </div>\n        }\n\n        <!-- Fallback: Show all contacts if no filtered contacts are available -->\n        @if (quickDialContacts().length === 0 && dashboardContacts().length === 0 && displayContacts().length > 0) {\n          <div class=\"ax-mb-8\">\n            <h2 class=\"ax-text-2xl ax-font-semibold ax-mb-4 ax-flex ax-items-center ax-gap-2\">\n              <ax-icon icon=\"fa-light fa-list\" class=\"ax-text-info\"></ax-icon>\n              All Emergency Contacts\n            </h2>\n            <div class=\"ax-grid ax-grid-cols-1 sm:ax-grid-cols-2 lg:ax-grid-cols-3 xl:ax-grid-cols-4 ax-gap-4\">\n              @for (contact of displayContacts(); track contact.id) {\n                <axm-emergency-contact-item [contact]=\"contact\"></axm-emergency-contact-item>\n              }\n            </div>\n          </div>\n        }\n\n        <!-- No Contacts State -->\n        @if (allContacts().length === 0 && !loading()) {\n          <axp-state-message\n            icon=\"fa-light fa-phone-slash\"\n            [title]=\"'@contact-management:no-emergency-contacts.title'\"\n            [description]=\"'@contact-management:no-emergency-contacts.description'\"\n          >\n          </axp-state-message>\n        }\n      </div>\n    }\n  </axp-page-content>\n</axp-page-layout>\n", styles: ["axm-emergency-contacts-page{display:block;width:100%;height:100%}axm-emergency-contacts-page .ax-space-y-6.ax-p-4{max-width:1200px;margin:0 auto;padding-left:1rem;padding-right:1rem}@media (min-width: 768px){axm-emergency-contacts-page .ax-space-y-6.ax-p-4{padding-left:1.5rem;padding-right:1.5rem}}axm-emergency-contacts-page h2{margin-bottom:1.25rem;color:var(--ax-sys-color-primary);border-bottom:1px solid var(--ax-sys-color-border);padding-bottom:.5rem}axm-emergency-contacts-page h2 ax-icon{margin-right:.5rem}@media (min-width: 768px){axm-emergency-contacts-page h2 ax-icon{margin-right:.75rem}}axm-emergency-contacts-page .emergency-contact-quick-dial{position:relative;--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;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));animation-duration:.2s;border:1px solid var(--ax-sys-color-outline-variant);min-height:140px}axm-emergency-contacts-page .emergency-contact-quick-dial:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);transform:translateY(-2px);border-color:var(--priority-color, var(--ax-sys-color-primary))}axm-emergency-contacts-page .emergency-contact-quick-dial h3{color:var(--ax-sys-color-on-surface);margin-bottom:.125rem;font-size:1rem;line-height:1.5rem;font-weight:600}@media (min-width: 768px){axm-emergency-contacts-page .emergency-contact-quick-dial h3{font-size:1.125rem;line-height:1.75rem}}axm-emergency-contacts-page .emergency-contact-quick-dial .ax-button{font-size:.75rem;line-height:1rem;font-weight:500}@media (min-width: 768px){axm-emergency-contacts-page .emergency-contact-quick-dial .ax-button{font-size:.875rem;line-height:1.25rem}}axm-emergency-contacts-page .emergency-contact-quick-dial .ax-button{min-height:30px}axm-emergency-contacts-page .emergency-contact-detailed{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;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));animation-duration:.2s;border:1px solid var(--ax-sys-color-outline-variant)}axm-emergency-contacts-page .emergency-contact-detailed:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);transform:translateY(-1px);border-color:var(--ax-sys-color-primary)}axm-emergency-contacts-page .emergency-contact-detailed h3{color:var(--ax-sys-color-on-surface);font-size:1.125rem;line-height:1.75rem;font-weight:600}@media (min-width: 768px){axm-emergency-contacts-page .emergency-contact-detailed h3{font-size:1.25rem;line-height:1.75rem}}axm-emergency-contacts-page .emergency-contact-detailed ax-icon{flex-shrink:0}@media (min-width: 640px){axm-emergency-contacts-page .emergency-contact-detailed .ax-grid-cols-1.sm\\\\:ax-grid-cols-2>div{min-width:0px}}@media (min-width: 1024px){axm-emergency-contacts-page .emergency-contact-detailed .ax-flex.ax-flex-col.ax-gap-3{position:-webkit-sticky;position:sticky;top:1rem}}axm-emergency-contacts-page ax-loading{margin-left:auto;margin-right:auto}axm-emergency-contacts-page .ax-text-center.ax-py-12 ax-icon{margin-left:auto;margin-right:auto;display:block}axm-emergency-contacts-page ax-badge[data-color=danger]{--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-danger-200),var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-danger-100),var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-danger-800),var(--tw-text-opacity, 1))}axm-emergency-contacts-page ax-badge[data-color=warning]{--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-warning-200),var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-warning-100),var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-warning-800),var(--tw-text-opacity, 1))}axm-emergency-contacts-page ax-badge[data-color=primary]{--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-primary-200),var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-primary-100),var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-primary-800),var(--tw-text-opacity, 1))}axm-emergency-contacts-page ax-badge[data-color=secondary]{--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-secondary-200),var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-secondary-100),var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-secondary-800),var(--tw-text-opacity, 1))}axm-emergency-contacts-page .ax-bg-warning-50 ax-icon{flex-shrink:0}axm-emergency-contacts-page .ax-font-mono{letter-spacing:.025em}@media (min-width: 640px){axm-emergency-contacts-page axp-layout-content .ax-gap-4{gap:1.5rem}}axm-emergency-contacts-page ax-button{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}axm-emergency-contacts-page ax-button:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}axm-emergency-contacts-page ax-button:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}axm-emergency-contacts-page ax-button[data-color=danger]{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}axm-emergency-contacts-page ax-button[data-color=danger]:hover{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}axm-emergency-contacts-page ax-icon.ax-w-4{height:1rem}axm-emergency-contacts-page ax-icon.ax-text-6xl{height:6rem;width:6rem}@media (max-width: 640px){axm-emergency-contacts-page .ax-grid-cols-1 .ax-gap-3{gap:.5rem}axm-emergency-contacts-page .emergency-contact-quick-dial .contact-info-text{font-size:.75rem;line-height:1rem}}@media print{axm-emergency-contacts-page .emergency-contact-quick-dial,axm-emergency-contacts-page .emergency-contact-detailed{break-inside:avoid;border-width:1px;--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}axm-emergency-contacts-page ax-button{display:none}axm-emergency-contacts-page .ax-bg-warning-50{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}}@media (prefers-contrast: high){axm-emergency-contacts-page .emergency-contact-quick-dial,axm-emergency-contacts-page .emergency-contact-detailed{border-width:2px}axm-emergency-contacts-page ax-badge{border-width:2px}}@media (prefers-reduced-motion: reduce){axm-emergency-contacts-page *{transition-property:none}axm-emergency-contacts-page ax-button:hover,axm-emergency-contacts-page .emergency-contact-quick-dial:hover{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}}\n"] }]
        }] });

var emergencyContactsPage_component = /*#__PURE__*/Object.freeze({
    __proto__: null,
    AXMEmergencyContactsPageComponent: AXMEmergencyContactsPageComponent
});

/**
 * Generated bundle index. Do not edit.
 */

export { AXMContactManagementEntityProvider, AXMContactManagementMenuProvider, AXMContactManagementModule, AXMContactManagementSearchCommandProvider, AXMContactMethodEntityModule, AXMContactMethodService, AXMContactMethodServiceImpl, AXMContactMethodTypeEntityModule, AXMContactMethodTypeService, AXMContactMethodTypeServiceImpl, AXMEmergencyContactEntityModule, AXMEmergencyContactItemComponent, AXMEmergencyContactService, AXMEmergencyContactServiceImpl, AXMEmergencyContactsPageComponent, AXMPermissionDefinitionProvider, RootConfig, contactMethodTypeFactory };
//# sourceMappingURL=acorex-modules-contact-management.mjs.map
