import * as _angular_core from '@angular/core';
import { Injector } from '@angular/core';
import * as i1 from '@acorex/platform/domain';
import { AXPPermissionDefinitionProvider, AXPPermissionDefinitionProviderContext } from '@acorex/platform/auth';
import * as _acorex_platform_layout_builder from '@acorex/platform/layout/builder';
import { AXPDynamicFormDefinition } from '@acorex/platform/layout/builder';
import * as _acorex_platform_layout_widget_core from '@acorex/platform/layout/widget-core';
import { AXPWidgetColumnNode, AXPWidgetNode, AXPPageStatus } from '@acorex/platform/layout/widget-core';
import * as _acorex_modules_report_management from '@acorex/modules/report-management';
import * as _ngrx_signals from '@ngrx/signals';
import * as _acorex_platform_themes_shared from '@acorex/platform/themes/shared';
import * as _acorex_platform_core from '@acorex/platform/core';
import { AXPDeviceService, AXPContextData, AXPGridLayoutOptions, AXPBreadcrumbItem, AXPActionMenuItem, AXPBackButton, AXPExecuteCommand, AXPFilterClause, AXPSystemActionType, AXPCategoryEntity, AXPExportOptions } from '@acorex/platform/core';
import { AXPPageLayoutBaseComponent } from '@acorex/platform/layout/views';
import { AXPQuerySort } from '@acorex/platform/common';
import { AXPCommand, AXPCommandService } from '@acorex/platform/runtime';
import { AXBarChartValue, AXBarChartOption } from '@acorex/charts/bar-chart';
import { AXChartLegendOptions } from '@acorex/charts/chart-legend';
import { AXRowCommandItemClickEvent, AXDataTableRowDbClick, AXRowCommandItem } from '@acorex/components/data-table';
import { AXDataSource } from '@acorex/cdk/common';
import { AXDonutChartValue } from '@acorex/charts/donut-chart';
import { AXLineChartValue } from '@acorex/charts/line-chart';

declare const RootConfig: {
    config: {
        i18n: string;
        module: string;
    };
    module: {
        route: string;
        name: string;
        title: string;
        icon: string;
    };
    entities: {
        dataSet: {
            name: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
        category: {
            name: string;
            fullName: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
        report: {
            name: string;
            fullName: string;
            title: string;
            titlePlural: string;
            icon: string;
        };
    };
};

declare class AXMReportManagementModule {
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMReportManagementModule, never>;
    static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXMReportManagementModule, never, [typeof i1.AXPDomainModule], never>;
    static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXMReportManagementModule>;
}

declare class AXMPermissionDefinitionProvider implements AXPPermissionDefinitionProvider {
    private injector;
    private readonly translateService;
    constructor(injector: Injector);
    define(context: AXPPermissionDefinitionProviderContext): Promise<void>;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMPermissionDefinitionProvider, never>;
    static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMPermissionDefinitionProvider>;
}

declare const AXMPermissionsKeys: {
    ReportManagement: {
        Management: string;
        Report: {
            Management: string;
            View: string;
            Create: string;
            Update: string;
            Delete: string;
        };
        Category: {
            Management: string;
            View: string;
            Create: string;
            Update: string;
            Delete: string;
        };
    };
};

declare class AXPReportViewerPageComponent extends AXPPageLayoutBaseComponent {
    protected layoutService: {
        currentMode: _angular_core.Signal<_acorex_platform_themes_shared.AXPThemeMode>;
        currentPalette: _angular_core.Signal<string>;
        systemThemeMode: _angular_core.Signal<_acorex_platform_themes_shared.AXPThemeMode>;
        font: _ngrx_signals.DeepSignal<{
            family: string;
            size: string;
        }>;
        overlayLoading: _angular_core.Signal<boolean>;
        navigationLoading: _angular_core.Signal<boolean>;
        overlayLoadingTaskCount: _angular_core.Signal<number>;
        navigationLoadingTaskCount: _angular_core.Signal<number>;
        sideMenuState: _angular_core.Signal<_acorex_platform_themes_shared.AXPSideMenuState>;
        sideMenuWidth: _angular_core.Signal<number>;
        menuOrientation: _angular_core.Signal<_acorex_platform_themes_shared.AXPMenuOrientation>;
        isPrinting: _angular_core.Signal<boolean>;
        isDarkMode: _angular_core.Signal<boolean>;
        isLightMode: _angular_core.Signal<boolean>;
        isSystemMode: _angular_core.Signal<boolean>;
        isSideMenuOpen: _angular_core.Signal<boolean>;
        isOverlayLoading: _angular_core.Signal<boolean>;
        isNavigationLoading: _angular_core.Signal<boolean>;
        isMenuHorizontal: _angular_core.Signal<boolean>;
        changeThemeMode: (theme: _acorex_platform_themes_shared.AXPThemeMode) => void;
        openSideMenu: () => void;
        closeSideMenu: () => void;
        setSideMenuWidth: (width: number) => void;
        toggleSideMenu: () => void;
        setNavigationLoading: (value: boolean, delay?: number) => void;
        setOverlayLoading: (value: boolean, delay?: number) => void;
        loadSettings: () => Promise<void>;
    } & _ngrx_signals.StateSource<{
        currentMode: _acorex_platform_themes_shared.AXPThemeMode;
        currentPalette: string;
        systemThemeMode: _acorex_platform_themes_shared.AXPThemeMode;
        font: {
            family: string;
            size: string;
        };
        overlayLoading: boolean;
        navigationLoading: boolean;
        overlayLoadingTaskCount: number;
        navigationLoadingTaskCount: number;
        sideMenuState: _acorex_platform_themes_shared.AXPSideMenuState;
        sideMenuWidth: number;
        menuOrientation: _acorex_platform_themes_shared.AXPMenuOrientation;
        isPrinting: boolean;
    }>;
    protected readonly deviceService: AXPDeviceService;
    private readonly route;
    private readonly router;
    private unsubscriber;
    private readonly loadingDialog;
    private readonly destroyRef;
    private readonly reportViewerService;
    reportId: _angular_core.InputSignal<string | undefined>;
    reportParameters: _angular_core.InputSignal<Record<string, any>>;
    private filtersForm;
    protected readonly vm: {
        reportDefinition: _angular_core.Signal<_acorex_modules_report_management.AXPReportDefinition | null>;
        currentLayout: _angular_core.Signal<_acorex_modules_report_management.AXPReportLayoutDefinition | null>;
        filterContext: _angular_core.Signal<AXPContextData>;
        categoriesPath: _angular_core.Signal<any[]>;
        allowFetchData: _angular_core.Signal<boolean>;
        shouldExecuteReport: _angular_core.Signal<boolean>;
        lastAppliedFilterContext: _angular_core.Signal<AXPContextData | null>;
        hasBeenExecuted: _angular_core.Signal<boolean>;
        status: _angular_core.Signal<_acorex_platform_layout_widget_core.AXPPageStatus>;
        error: _angular_core.Signal<string | null>;
        showRowIndexColumn: _angular_core.Signal<boolean>;
        availableLayouts: _angular_core.Signal<_acorex_modules_report_management.AXPLayoutSwitcherOption[]>;
        defaultLayout: _angular_core.Signal<_acorex_modules_report_management.AXPReportLayoutDefinition | null>;
        activeLayoutId: _angular_core.Signal<string | null>;
        layoutType: _angular_core.Signal<"table" | "chart" | "pdf" | null>;
        tableLayoutConfig: _angular_core.Signal<_acorex_modules_report_management.AXPReportTableLayout | null>;
        chartLayoutConfig: _angular_core.Signal<_acorex_modules_report_management.AXPReportChartLayout | null>;
        pdfLayoutConfig: _angular_core.Signal<_acorex_modules_report_management.AXPReportPdfLayout | null>;
        isLoading: _angular_core.Signal<boolean>;
        isExecuting: _angular_core.Signal<boolean>;
        hasError: _angular_core.Signal<boolean>;
        canExecute: _angular_core.Signal<boolean>;
        hasMultipleLayouts: _angular_core.Signal<boolean>;
        title: _angular_core.Signal<string>;
        description: _angular_core.Signal<string | null>;
        formDefinition: _angular_core.Signal<_acorex_platform_layout_builder.AXPDynamicFormDefinition>;
        isTableLayout: _angular_core.Signal<boolean>;
        isChartLayout: _angular_core.Signal<boolean>;
        isPdfLayout: _angular_core.Signal<boolean>;
        hasUnappliedFilters: _angular_core.Signal<boolean>;
        canSwitchLayout: _angular_core.Signal<boolean>;
        canSelectRows: _angular_core.Signal<boolean | undefined>;
        loadReport: (reportId: string) => Promise<void>;
        switchLayout: (layoutId: string) => void;
        executeReport: () => Promise<void>;
        fetchData: (parameters?: AXPContextData) => Promise<_acorex_modules_report_management.AXPExecutionReportCommandResult | null>;
        updateFilterContext: (context: Record<string, any>) => void;
        clearFilters: () => void;
        resetFilters: () => void;
        exportReport: (format: string) => Promise<void>;
        refresh: () => Promise<void>;
        clearError: () => void;
        clearExecutionState: () => void;
        cancel: () => void;
        reset: () => void;
    } & _ngrx_signals.StateSource<{
        reportDefinition: _acorex_modules_report_management.AXPReportDefinition | null;
        currentLayout: _acorex_modules_report_management.AXPReportLayoutDefinition | null;
        filterContext: AXPContextData;
        categoriesPath: any[];
        allowFetchData: boolean;
        shouldExecuteReport: boolean;
        lastAppliedFilterContext: AXPContextData | null;
        hasBeenExecuted: boolean;
        status: _acorex_platform_layout_widget_core.AXPPageStatus;
        error: string | null;
        showRowIndexColumn: boolean;
    }>;
    private readonly watchNavigationLoading;
    private loadingDialogRef;
    private isDialogOpening;
    constructor();
    protected showFiltersPanel: () => boolean;
    protected showReportDisplay: () => boolean;
    private baseRoutes;
    protected defaultLayout: () => AXPGridLayoutOptions;
    protected compactLayout: () => AXPGridLayoutOptions;
    ngOnInit(): Promise<void>;
    /**
     * Effect to handle data fetching when chart configuration changes
     */
    private loadReportAndRefresh;
    private openContentLoading;
    private closeContentLoading;
    /**
     * Synchronizes filter context to URL query parameters using dot notation
     * @param filterContext The current filter context to sync
     */
    private syncFiltersToUrl;
    /**
     * Checks if a filter value is considered empty
     */
    private isFilterValueEmpty;
    /**
     * Flattens filter context to dot notation query parameters
     * Only includes operation.type and value - skips displayText and other fields
     * Example: { operation: { type: 'in' }, value: ['POST', 'GET'] }
     *          -> { 'fieldName.operation.type': 'in', 'fieldName.value': 'POST,GET' }
     */
    private flattenToDotNotation;
    /**
     * Flattens a value object (for nested objects in value field)
     */
    private flattenValueObject;
    /**
     * Reconstructs filter context from dot notation query parameters
     * Only parses operation.type and value - ignores other fields
     * Example: { 'fieldName.operation.type': 'in', 'fieldName.value': 'POST,GET' }
     *          -> { fieldName: { operation: { type: 'in' }, value: ['POST', 'GET'] } }
     */
    private parseFilterContextFromUrl;
    /**
     * Sets a value in a nested object using a path array
     */
    private setNestedValue;
    /**
     * Parses a string value, handling arrays (comma-separated) and primitives
     */
    private parseValue;
    /**
     * Parses a primitive value
     * For query params, we keep everything as string to match user requirement
     * Arrays are handled separately in parseValue
     */
    private parsePrimitive;
    protected handleFiltersChange(event: AXPContextData): void;
    protected handleFiltersInitiated(event: AXPContextData): void;
    protected handleExecuteReport(): Promise<void>;
    protected handleRefresh(): void;
    protected handleClearFilters(): void;
    /**
     * Handle download report action
     * Gets PDF data from viewmodel and calls service executeAction method
     */
    protected handleDownloadReport(): Promise<void>;
    /**
     * Handle print report action
     * Gets PDF data from viewmodel and calls service executeAction method
     */
    protected handlePrintReport(): Promise<void>;
    /**
     * Handle export report action
     * Gets report data from viewmodel and calls service executeAction method
     * @param format - Export format (excel, csv, pdf, image)
     */
    protected handleExportReport(format?: string): Promise<void>;
    protected getPageBreadcrumbs(): Promise<AXPBreadcrumbItem[]>;
    getPageTitle(): Promise<string>;
    getPageDescription(): Promise<string | null>;
    protected getPageIcon(): string | null;
    protected getTitleActions(): AXPActionMenuItem[] | Promise<AXPActionMenuItem[]>;
    getBackButton(): Promise<AXPBackButton | null>;
    onBackButtonClick(): Promise<void>;
    getPrimaryMenuItems(): Promise<AXPActionMenuItem[]>;
    getSecondaryMenuItems(): Promise<AXPActionMenuItem[]>;
    execute(command: AXPExecuteCommand): Promise<void>;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPReportViewerPageComponent, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXPReportViewerPageComponent, "axp-report-viewer-page", never, { "reportId": { "alias": "reportId"; "required": false; "isSignal": true; }; "reportParameters": { "alias": "reportParameters"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
}

type AXPReportLayoutType = 'table' | 'chart' | 'cards' | 'custom' | 'pdf';
/**
 * Report Category - Extends AXPCategoryEntity for consistency and performance
 *
 * Inherited properties from AXPCategoryEntity:
 * - id: string                   - Unique identifier
 * - title: string                - Display name
 * - description?: string         - Category description
 * - parentId?: string            - Parent category ID
 * - childrenCount: number        - Direct child categories count (enables lazy loading)
 * - itemsCount?: number          - Direct reports count (replaces hasReport boolean)
 * - totalChildrenCount?: number - Total nested categories (optional, for analytics)
 * - totalItemsCount?: number    - Total reports in tree (optional, for analytics)
 *
 * Performance benefits:
 * - Lazy loading support (childrenCount > 0 shows expand icon)
 * - Report count display (itemsCount shows "5 reports" badge)
 * - Efficient queries (no need to query to know if expandable)
 */
interface AXPReportCategory extends AXPCategoryEntity {
}
interface AXPReportDefinition {
    id: string;
    title: string;
    description?: string;
    categoryIds: string[];
    parameterGroups: AXPReportParameterGroup[];
    permissions?: string[];
    layouts: AXPReportLayoutDefinition[];
    defaultLayoutId: string;
}
type AXPReportLayoutAction = AXPActionMenuItem & {
    priority: 'primary' | 'secondary';
};
/**
 * Layout Definition - Associates a layout with metadata
 */
interface AXPReportLayoutDefinition {
    id: string;
    title: string;
    description?: string;
    icon?: string;
    layout: AXPReportLayout;
    dataSource?: AXPReportDataSource;
    isDefault?: boolean;
    actions?: AXPReportLayoutAction[];
    export?: AXPExportOptions;
}
interface AXPReportParameterGroup {
    name: string;
    title: string;
    description?: string;
    parameters: AXPReportParameter[];
}
interface AXPReportParameter {
    path: string;
    title: string;
    description?: string;
    widget: AXPWidgetNode;
}
type AXPReportDataSource = AXPQueryDataSource | AXPCustomDataSource | AXPAggregatedDataSource | AXPTransformedDataSource;
/**
 * Query Data Source - Used for executing predefined queries (AXPQuery)
 */
interface AXPQueryDataSource {
    type: 'query';
    name: string;
    description?: string;
    inputs?: AXPReportParameterBinding[];
    sortFields?: AXPQuerySort[];
    pagination?: boolean;
}
/**
 * Custom Data Source - Used for fetching data from custom providers like REST APIs or external services
 */
interface AXPCustomDataSource {
    type: 'custom';
    provider: string;
    description?: string;
    inputs?: AXPReportParameterBinding[];
    options?: {
        [key: string]: any;
    };
}
/**
 * Parameter Binding - Maps report-level parameters to actual query/command input structure
 */
interface AXPReportParameterBinding {
    parameterKey: string;
    bindTo: string;
}
/**
 * Aggregated Data Source - Used for pre-aggregated data optimized for charts
 */
interface AXPAggregatedDataSource {
    type: 'aggregated';
    baseQuery: string;
    description?: string;
    groupBy: string[];
    aggregations: AXPAggregation[];
    inputs?: AXPReportParameterBinding[];
}
/**
 * Transformed Data Source - Applies transformations to existing data sources
 */
interface AXPTransformedDataSource {
    type: 'transformed';
    baseDataSource: AXPReportDataSource;
    description?: string;
    transformations: AXPDataTransformation[];
    inputs?: AXPReportParameterBinding[];
}
/**
 * Aggregation operation for aggregated data sources
 */
interface AXPAggregation {
    field: string;
    operation: 'sum' | 'avg' | 'count' | 'min' | 'max' | 'distinct';
    alias?: string;
}
/**
 * Data transformation operation
 */
interface AXPDataTransformation {
    type: 'filter' | 'sort' | 'group' | 'pivot' | 'format';
    config: Record<string, any>;
}
type AXPReportLayout = AXPReportTableLayout | AXPReportChartLayout | AXPReportPdfLayout;
/**
 * Table Layout - Displays data in tabular format
 */
interface AXPReportTableLayoutRowAction extends AXPActionMenuItem {
    priority: 'primary' | 'secondary';
    type: AXPSystemActionType | string;
    default?: boolean;
}
interface AXPReportTableLayout {
    type: 'table';
    columns: AXPReportColumn[];
    actions?: AXPReportTableLayoutRowAction[];
    options?: AXPTableOptions;
    groupBy?: string[];
    conditionalFormatting?: AXPConditionalFormatRule[];
    summary?: AXPReportSummaryOptions[];
    header?: AXPReportHeaderFooter;
    footer?: AXPReportHeaderFooter;
}
interface AXPTableOptions {
    pagination?: boolean;
    stickyHeader?: boolean;
    stripedRows?: boolean;
    sorting?: AXPQuerySort[];
    selectable?: {
        mode: 'single' | 'multiple' | 'none';
    };
}
/**
 * Chart Layout - Displays data in various chart formats
 */
interface AXPReportChartLayout {
    type: 'chart';
    options: AXPReportChartOptions;
    header?: AXPReportHeaderFooter;
    footer?: AXPReportHeaderFooter;
}
interface AXPReportChartOptions {
    chartType: 'bar' | 'line' | 'pie' | 'doughnut' | 'area' | 'scatter' | 'radar' | 'mixed';
    dataMapping: AXPChartDataMapping;
    styling?: AXPChartStyling;
    interactivity?: AXPChartInteractivity;
}
/**
 * Chart Data Mapping Configuration
 */
interface AXPChartDataMapping {
    xField: string;
    yFields: string | string[];
    groupBy?: string;
    seriesField?: string;
    sizeField?: string;
    colorField?: string;
    labelField?: string;
    aggregation?: {
        method: 'sum' | 'avg' | 'count' | 'min' | 'max';
        field: string;
    };
}
/**
 * Chart Visual Styling Configuration
 */
interface AXPChartStyling {
    colorScheme?: 'default' | 'primary' | 'success' | 'warning' | 'danger' | 'custom';
    customColors?: string[];
    gridLines?: boolean;
    legend?: {
        show: boolean;
        position: 'top' | 'bottom' | 'left' | 'right';
    };
    xAxis?: AXPChartAxisConfig;
    yAxis?: AXPChartAxisConfig;
    animation?: {
        enabled: boolean;
        duration?: number;
    };
    chartSpecific?: {
        bar?: {
            orientation: 'vertical' | 'horizontal';
            mode: 'grouped' | 'stacked';
            barWidth?: number;
        };
        line?: {
            style: 'straight' | 'curved' | 'stepped';
            showPoints?: boolean;
            tension?: number;
        };
        area?: {
            mode: 'normal' | 'stacked' | 'percentage';
            opacity?: number;
        };
        pie?: {
            startAngle?: number;
            innerRadius?: number;
            showLabels?: boolean;
        };
    };
}
/**
 * Chart Axis Configuration
 */
interface AXPChartAxisConfig {
    title?: string;
    show?: boolean;
    type?: 'linear' | 'logarithmic' | 'datetime' | 'category';
    min?: number | string;
    max?: number | string;
    format?: string;
    gridLines?: boolean;
    tickInterval?: number;
}
/**
 * Chart Interactivity Configuration
 */
interface AXPChartInteractivity {
    zoom?: {
        enabled: boolean;
        mode?: 'x' | 'y' | 'xy';
    };
    tooltips?: {
        enabled: boolean;
        format?: string;
        showOnHover?: boolean;
    };
    onClick?: {
        enabled: boolean;
        action?: 'drill-down' | 'filter' | 'custom';
    };
    selection?: {
        enabled: boolean;
        mode?: 'single' | 'multiple';
    };
    export?: {
        enabled: boolean;
        formats?: ('png' | 'jpg' | 'pdf' | 'svg')[];
    };
}
/**
 * PDF Layout - Displays PDF documents
 */
interface AXPReportPdfLayout {
    type: 'pdf';
    options?: AXPReportPdfOptions;
    header?: AXPReportHeaderFooter;
    footer?: AXPReportHeaderFooter;
}
/**
 * PDF Layout Options
 */
interface AXPReportPdfOptions {
    showDownloadButton?: boolean;
    showPrintButton?: boolean;
    showZoomControls?: boolean;
    showFullscreenButton?: boolean;
    defaultZoom?: number;
    height?: string;
}
interface AXPReportColumn {
    field: string;
    title?: string;
    visible?: boolean;
    width?: number | 'auto';
    align?: 'left' | 'center' | 'right';
    widget?: AXPWidgetColumnNode;
}
interface AXPReportSummaryOptions {
    field: string;
    operation: 'sum' | 'avg' | 'count' | 'min' | 'max';
    displayIn: 'groupFooter' | 'reportFooter';
}
interface AXPConditionalFormatRule {
    field: string;
    condition: '>' | '<' | '=' | '!=' | 'contains';
    value: any;
    style: {
        color?: string;
        backgroundColor?: string;
        fontWeight?: 'normal' | 'bold';
    };
}
interface AXPReportHeaderFooter {
    title?: string;
    logoUrl?: string;
    showDate?: boolean;
    showParameters?: boolean;
    customHtml?: string;
}
/**
 * Layout switcher options for UI components
 */
interface AXPLayoutSwitcherOption {
    id: string;
    title: string;
    icon?: string;
    type: AXPReportLayoutType;
}
/**
 * Runtime layout selection state
 */
interface AXPReportLayoutState {
    reportId: string;
    activeLayoutId: string;
    availableLayouts: AXPLayoutSwitcherOption[];
}
/**
 * Layout validation result
 */
interface AXPLayoutValidationResult {
    isValid: boolean;
    errors: string[];
    layoutId: string;
}
/**
 * Data source resolution result for a specific layout
 */
interface AXPLayoutDataSourceResolution {
    layoutId: string;
    dataSource: AXPReportDataSource;
    source: 'layout' | 'report' | 'none';
}
/**
 * Layout execution context with resolved data source
 */
interface AXPLayoutExecutionContext {
    reportId: string;
    layoutId: string;
    dataSource: AXPReportDataSource;
    filters: AXPFilterClause;
}
type AXPExecutionReportResult = {
    type: 'table';
    items: Record<string, unknown>[];
    total: number;
} | {
    type: 'chart';
    data: Record<string, unknown>;
} | {
    type: 'cards';
    items: Record<string, unknown>[];
} | {
    type: 'custom';
    data: unknown;
} | {
    type: 'pdf';
    url?: string;
    base64?: string;
    blob?: Blob;
    filename?: string;
};
type AXPExecutionReportCommandResult = AXPReportLayout & {
    data: AXPExecutionReportResult;
};
interface AXPExecutionReportCommand extends AXPCommand<AXPLayoutExecutionContext, AXPExecutionReportCommandResult> {
}
/**
 * Report execution status and metadata
 */
interface AXPReportExecutionStatus {
    reportId: string;
    layoutId: string;
    status: 'pending' | 'executing' | 'completed' | 'failed' | 'cancelled';
    startTime: Date;
    endTime?: Date;
    duration?: number;
    recordCount?: number;
    error?: AXPReportExecutionError;
}
/**
 * Detailed error information for report execution
 */
interface AXPReportExecutionError {
    code: string;
    message: string;
    details?: Record<string, unknown>;
    stack?: string;
}
/**
 * Report execution request with options
 */
interface AXPReportExecutionRequest {
    reportId: string;
    layoutId: string;
    parameters: Record<string, unknown>;
    options?: AXPReportExecutionOptions;
}
/**
 * Options for report execution
 */
interface AXPReportExecutionOptions {
    timeout?: number;
    priority?: 'low' | 'normal' | 'high';
    cache?: boolean;
    cacheTimeout?: number;
}

/**
 * Report Viewer Service
 *
 * Handles report definition retrieval, caching, and layout actions.
 *
 * Performance optimizations:
 * 1. Uses childrenCount to determine if category has children (no query needed)
 * 2. Uses itemsCount to determine if category has reports (no query needed)
 * 3. Aggressive caching prevents duplicate API calls
 * 4. Single pending request per resource prevents race conditions
 * 5. Lazy loading - only loads data when needed
 */
declare class AXPReportViewerService {
    private readonly entityService;
    private readonly reportCategoryService;
    private readonly reportDefinitionService;
    /** Cache for categories by id - O(1) lookup */
    private categoriesById;
    /** Cache for categories by parentId - O(1) lookup */
    private categoriesByParentId;
    /** Cache for report definitions by categoryId - O(1) lookup */
    private definitionsByCategory;
    /** Cache for individual report definitions by id - O(1) lookup */
    private definitionsById;
    /** Pending API requests to prevent duplicate calls */
    private pendingCategoriesRequests;
    private pendingDefinitionsRequests;
    private pendingReportRequests;
    /**
     * Get categories by parentId with aggressive caching
     *
     * Optimization: Returns cached result immediately if available,
     * preventing unnecessary API calls during navigation
     *
     * @param parentId - Parent category ID (undefined = root categories)
     * @returns Array of categories with count metadata (childrenCount, itemsCount)
     */
    getCategories(parentId?: string): Promise<AXPReportCategory[]>;
    /**
     * Get single category by ID with O(1) lookup
     *
     * Optimization: Uses Map for instant retrieval, falls back to
     * searching cache, then providers if not found
     */
    getCategoryById(categoryId: string): Promise<AXPReportCategory | undefined>;
    /**
     * Get category path from root to specified category
     *
     * Optimization: Builds path using cached categories only
     */
    getCategoriesPathById(categoryId: string): Promise<AXPReportCategory[]>;
    /**
     * Get report definitions for a category with smart caching
     *
     * Optimization: Checks itemsCount before querying
     * - If itemsCount = 0, returns empty array (no API call)
     * - If itemsCount > 0, loads and caches reports
     * - Returns cached result on subsequent calls
     *
     * @param categoryId - Category ID to get reports from
     * @returns Array of report definitions
     */
    getReportsByCategoryId(categoryId: string): Promise<AXPReportDefinition[]>;
    /**
     * Get single report definition by ID with O(1) lookup
     *
     * Optimization: Uses Map for instant retrieval
     */
    getReportById(id: string): Promise<AXPReportDefinition | undefined>;
    /**
     * Get category ID containing a specific report
     *
     * Optimization: Searches cache first, loads on-demand if needed
     */
    getCategoryIdByReportId(reportId: string): Promise<string | undefined>;
    /**
     * Get category path for a report
     */
    getCategoriesPathByReportId(reportId: string): Promise<AXPReportCategory[]>;
    /**
     * Get general actions list for a layout type
     * Override in connectivity layer (mock/API) to provide general actions
     * Base implementation returns empty array
     *
     * @param layoutType - The layout type
     * @returns Array of general actions for the layout type
     */
    getGeneralActionsList(layoutType: AXPReportLayoutType): AXPReportLayoutAction[];
    /**
     * Get merged actions for a layout definition
     * Combines general actions (from getGeneralActionsList) with layout-specific actions
     * Layout-specific actions take precedence (by name) over general actions
     *
     * @param layoutDefinition - The layout definition
     * @returns Merged array of actions (general + custom)
     */
    getMergedActions(layoutDefinition: AXPReportLayoutDefinition): AXPReportLayoutAction[];
    /**
     * Get primary actions for a layout definition
     */
    getPrimaryActions(layoutDefinition: AXPReportLayoutDefinition): AXPReportLayoutAction[];
    /**
     * Get secondary actions for a layout definition
     */
    getSecondaryActions(layoutDefinition: AXPReportLayoutDefinition): AXPReportLayoutAction[];
    /**
     * Load categories from entity service and cache results
     * Can be overridden in extended services (e.g., API layer)
     */
    protected loadCategories(parentId?: string): Promise<AXPReportCategory[]>;
    /**
     * Load report definitions from entity service and cache results
     * Can be overridden in extended services (e.g., API layer)
     */
    protected loadReports(categoryId: string): Promise<AXPReportDefinition[]>;
    /**
     * Load single report from entity service and cache result
     * Can be overridden in extended services (e.g., API layer)
     */
    protected loadReport(id: string): Promise<AXPReportDefinition | undefined>;
    /**
     * Breadth-first search through category hierarchy
     */
    private searchCategoryInHierarchy;
    /**
     * Check if category has children (uses cached count)
     */
    categoryHasChildren(categoryId: string): boolean;
    /**
     * Check if category has reports (uses cached count)
     */
    categoryHasReports(categoryId: string): boolean;
    /**
     * Protected: Check if categories are cached for a parentId
     * Used by extended services (e.g., mock) to determine if logging is needed
     */
    protected isCategoriesCached(parentId?: string): boolean;
    /**
     * Protected: Check if a category is cached by ID
     * Used by extended services (e.g., mock) to determine if logging is needed
     */
    protected isCategoryCached(categoryId: string): boolean;
    /**
     * Protected: Check if reports are cached for a categoryId
     * Used by extended services (e.g., mock) to determine if logging is needed
     */
    protected isReportsCached(categoryId: string): boolean;
    /**
     * Protected: Check if a report is cached by ID
     * Used by extended services (e.g., mock) to determine if logging is needed
     */
    protected isReportCached(reportId: string): boolean;
    /**
     * Clear all caches
     */
    clearAllCache(): void;
    /**
     * Clear categories cache only
     */
    clearCategoriesCache(): void;
    /**
     * Clear reports cache only
     */
    clearReportsCache(): void;
    /**
     * Execute report with given context
     * Override in connectivity layer (mock/API) to implement report execution
     *
     * @param context - Layout execution context with reportId, layoutId, dataSource, and filters
     * @returns Report execution result with layout and data
     */
    executeReport(context: AXPLayoutExecutionContext): Promise<AXPExecutionReportCommandResult>;
    /**
     * Execute action by command name
     * Override in connectivity layer (mock/API) to implement action execution
     *
     * @param commandName - Command name (e.g., 'download-report', 'print-report', 'export-report')
     * @param options - Command options (e.g., { format: 'excel', pdfData: {...}, reportData: {...} })
     */
    executeAction(commandName: string, options?: Record<string, unknown>): Promise<void>;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPReportViewerService, never>;
    static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXPReportViewerService>;
}

declare function AXPieChartReportMapper(data: Record<string, number>): AXDonutChartValue;
declare function AXBarChartReportMapper(data: Record<string, number>): AXBarChartValue;
declare function AXLineChartReportMapper(data: Record<string, number>): AXLineChartValue;
/**
 * Converts AXPContextData (filter context) to AXPFilterClause format
 *
 * Input format:
 * {
 *   "fieldName": {
 *     "operation": { "type": "between" },
 *     "value": { "from": "...", "to": "..." }
 *   }
 * }
 *
 * Output format:
 * {
 *   logic: 'and',
 *   filters: [
 *     {
 *       field: 'fieldName',
 *       operator: { type: 'between' },
 *       value: { from: "...", to: "..." }
 *     }
 *   ]
 * }
 */
declare function convertContextDataToFilterClause(context: AXPContextData): AXPFilterClause;

declare const AXPReportViewerViewModel: _angular_core.Type<{
    reportDefinition: _angular_core.Signal<AXPReportDefinition | null>;
    currentLayout: _angular_core.Signal<AXPReportLayoutDefinition | null>;
    filterContext: _angular_core.Signal<AXPContextData>;
    categoriesPath: _angular_core.Signal<any[]>;
    allowFetchData: _angular_core.Signal<boolean>;
    shouldExecuteReport: _angular_core.Signal<boolean>;
    lastAppliedFilterContext: _angular_core.Signal<AXPContextData | null>;
    hasBeenExecuted: _angular_core.Signal<boolean>;
    status: _angular_core.Signal<AXPPageStatus>;
    error: _angular_core.Signal<string | null>;
    showRowIndexColumn: _angular_core.Signal<boolean>;
    availableLayouts: _angular_core.Signal<AXPLayoutSwitcherOption[]>;
    defaultLayout: _angular_core.Signal<AXPReportLayoutDefinition | null>;
    activeLayoutId: _angular_core.Signal<string | null>;
    layoutType: _angular_core.Signal<"table" | "chart" | "pdf" | null>;
    tableLayoutConfig: _angular_core.Signal<AXPReportTableLayout | null>;
    chartLayoutConfig: _angular_core.Signal<AXPReportChartLayout | null>;
    pdfLayoutConfig: _angular_core.Signal<AXPReportPdfLayout | null>;
    isLoading: _angular_core.Signal<boolean>;
    isExecuting: _angular_core.Signal<boolean>;
    hasError: _angular_core.Signal<boolean>;
    canExecute: _angular_core.Signal<boolean>;
    hasMultipleLayouts: _angular_core.Signal<boolean>;
    title: _angular_core.Signal<string>;
    description: _angular_core.Signal<string | null>;
    formDefinition: _angular_core.Signal<AXPDynamicFormDefinition>;
    isTableLayout: _angular_core.Signal<boolean>;
    isChartLayout: _angular_core.Signal<boolean>;
    isPdfLayout: _angular_core.Signal<boolean>;
    hasUnappliedFilters: _angular_core.Signal<boolean>;
    canSwitchLayout: _angular_core.Signal<boolean>;
    canSelectRows: _angular_core.Signal<boolean | undefined>;
    loadReport: (reportId: string) => Promise<void>;
    switchLayout: (layoutId: string) => void;
    executeReport: () => Promise<void>;
    fetchData: (parameters?: AXPContextData) => Promise<AXPExecutionReportCommandResult | null>;
    updateFilterContext: (context: Record<string, any>) => void;
    clearFilters: () => void;
    resetFilters: () => void;
    exportReport: (format: string) => Promise<void>;
    refresh: () => Promise<void>;
    clearError: () => void;
    clearExecutionState: () => void;
    cancel: () => void;
    reset: () => void;
} & _ngrx_signals.StateSource<{
    reportDefinition: AXPReportDefinition | null;
    currentLayout: AXPReportLayoutDefinition | null;
    filterContext: AXPContextData;
    categoriesPath: any[];
    allowFetchData: boolean;
    shouldExecuteReport: boolean;
    lastAppliedFilterContext: AXPContextData | null;
    hasBeenExecuted: boolean;
    status: AXPPageStatus;
    error: string | null;
    showRowIndexColumn: boolean;
}>>;

declare class AXPReportBarChartViewComponent {
    #private;
    protected readonly vm: {
        reportDefinition: _angular_core.Signal<_acorex_modules_report_management.AXPReportDefinition | null>;
        currentLayout: _angular_core.Signal<_acorex_modules_report_management.AXPReportLayoutDefinition | null>;
        filterContext: _angular_core.Signal<_acorex_platform_core.AXPContextData>;
        categoriesPath: _angular_core.Signal<any[]>;
        allowFetchData: _angular_core.Signal<boolean>;
        shouldExecuteReport: _angular_core.Signal<boolean>;
        lastAppliedFilterContext: _angular_core.Signal<_acorex_platform_core.AXPContextData | null>;
        hasBeenExecuted: _angular_core.Signal<boolean>;
        status: _angular_core.Signal<AXPPageStatus>;
        error: _angular_core.Signal<string | null>;
        showRowIndexColumn: _angular_core.Signal<boolean>;
        availableLayouts: _angular_core.Signal<_acorex_modules_report_management.AXPLayoutSwitcherOption[]>;
        defaultLayout: _angular_core.Signal<_acorex_modules_report_management.AXPReportLayoutDefinition | null>;
        activeLayoutId: _angular_core.Signal<string | null>;
        layoutType: _angular_core.Signal<"table" | "chart" | "pdf" | null>;
        tableLayoutConfig: _angular_core.Signal<_acorex_modules_report_management.AXPReportTableLayout | null>;
        chartLayoutConfig: _angular_core.Signal<AXPReportChartLayout | null>;
        pdfLayoutConfig: _angular_core.Signal<_acorex_modules_report_management.AXPReportPdfLayout | null>;
        isLoading: _angular_core.Signal<boolean>;
        isExecuting: _angular_core.Signal<boolean>;
        hasError: _angular_core.Signal<boolean>;
        canExecute: _angular_core.Signal<boolean>;
        hasMultipleLayouts: _angular_core.Signal<boolean>;
        title: _angular_core.Signal<string>;
        description: _angular_core.Signal<string | null>;
        formDefinition: _angular_core.Signal<_acorex_platform_layout_builder.AXPDynamicFormDefinition>;
        isTableLayout: _angular_core.Signal<boolean>;
        isChartLayout: _angular_core.Signal<boolean>;
        isPdfLayout: _angular_core.Signal<boolean>;
        hasUnappliedFilters: _angular_core.Signal<boolean>;
        canSwitchLayout: _angular_core.Signal<boolean>;
        canSelectRows: _angular_core.Signal<boolean | undefined>;
        loadReport: (reportId: string) => Promise<void>;
        switchLayout: (layoutId: string) => void;
        executeReport: () => Promise<void>;
        fetchData: (parameters?: _acorex_platform_core.AXPContextData) => Promise<_acorex_modules_report_management.AXPExecutionReportCommandResult | null>;
        updateFilterContext: (context: Record<string, any>) => void;
        clearFilters: () => void;
        resetFilters: () => void;
        exportReport: (format: string) => Promise<void>;
        refresh: () => Promise<void>;
        clearError: () => void;
        clearExecutionState: () => void;
        cancel: () => void;
        reset: () => void;
    } & _ngrx_signals.StateSource<{
        reportDefinition: _acorex_modules_report_management.AXPReportDefinition | null;
        currentLayout: _acorex_modules_report_management.AXPReportLayoutDefinition | null;
        filterContext: _acorex_platform_core.AXPContextData;
        categoriesPath: any[];
        allowFetchData: boolean;
        shouldExecuteReport: boolean;
        lastAppliedFilterContext: _acorex_platform_core.AXPContextData | null;
        hasBeenExecuted: boolean;
        status: AXPPageStatus;
        error: string | null;
        showRowIndexColumn: boolean;
    }>;
    protected readonly AXPPageStatus: typeof AXPPageStatus;
    /**
     * Current chart layout configuration
     */
    protected readonly chartLayout: _angular_core.Signal<AXPReportChartLayout | null>;
    /**
     * Chart configuration options
     */
    protected readonly chartOptions: _angular_core.Signal<_acorex_modules_report_management.AXPReportChartOptions | null>;
    /**
     * Chart type for rendering
     */
    protected readonly chartType: _angular_core.Signal<"bar" | "line" | "pie" | "doughnut" | "area" | "scatter" | "radar" | "mixed">;
    /**
     * Data mapping configuration
     */
    protected readonly dataMapping: _angular_core.Signal<_acorex_modules_report_management.AXPChartDataMapping | null>;
    /**
     * Handle chart click events
     */
    protected handleChartClick(event: any): void;
    /**
     * Handle chart data point selection
     */
    protected handleDataPointSelect(event: any): void;
    /**
     * Check if chart is ready to render
     */
    protected isChartReady(): boolean;
    /**
     * Get chart configuration for rendering
     */
    protected getChartConfig(): any;
    protected barChartData: _angular_core.WritableSignal<AXBarChartValue>;
    protected barChartOptions: _angular_core.WritableSignal<AXBarChartOption>;
    protected legendOptions: _angular_core.WritableSignal<AXChartLegendOptions>;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPReportBarChartViewComponent, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXPReportBarChartViewComponent, "axp-report-bar-chart-view", never, {}, {}, never, never, true, never>;
}

declare class AXPReportTableViewComponent {
    #private;
    protected readonly vm: {
        reportDefinition: _angular_core.Signal<_acorex_modules_report_management.AXPReportDefinition | null>;
        currentLayout: _angular_core.Signal<_acorex_modules_report_management.AXPReportLayoutDefinition | null>;
        filterContext: _angular_core.Signal<_acorex_platform_core.AXPContextData>;
        categoriesPath: _angular_core.Signal<any[]>;
        allowFetchData: _angular_core.Signal<boolean>;
        shouldExecuteReport: _angular_core.Signal<boolean>;
        lastAppliedFilterContext: _angular_core.Signal<_acorex_platform_core.AXPContextData | null>;
        hasBeenExecuted: _angular_core.Signal<boolean>;
        status: _angular_core.Signal<_acorex_platform_layout_widget_core.AXPPageStatus>;
        error: _angular_core.Signal<string | null>;
        showRowIndexColumn: _angular_core.Signal<boolean>;
        availableLayouts: _angular_core.Signal<_acorex_modules_report_management.AXPLayoutSwitcherOption[]>;
        defaultLayout: _angular_core.Signal<_acorex_modules_report_management.AXPReportLayoutDefinition | null>;
        activeLayoutId: _angular_core.Signal<string | null>;
        layoutType: _angular_core.Signal<"table" | "chart" | "pdf" | null>;
        tableLayoutConfig: _angular_core.Signal<AXPReportTableLayout | null>;
        chartLayoutConfig: _angular_core.Signal<_acorex_modules_report_management.AXPReportChartLayout | null>;
        pdfLayoutConfig: _angular_core.Signal<_acorex_modules_report_management.AXPReportPdfLayout | null>;
        isLoading: _angular_core.Signal<boolean>;
        isExecuting: _angular_core.Signal<boolean>;
        hasError: _angular_core.Signal<boolean>;
        canExecute: _angular_core.Signal<boolean>;
        hasMultipleLayouts: _angular_core.Signal<boolean>;
        title: _angular_core.Signal<string>;
        description: _angular_core.Signal<string | null>;
        formDefinition: _angular_core.Signal<_acorex_platform_layout_builder.AXPDynamicFormDefinition>;
        isTableLayout: _angular_core.Signal<boolean>;
        isChartLayout: _angular_core.Signal<boolean>;
        isPdfLayout: _angular_core.Signal<boolean>;
        hasUnappliedFilters: _angular_core.Signal<boolean>;
        canSwitchLayout: _angular_core.Signal<boolean>;
        canSelectRows: _angular_core.Signal<boolean | undefined>;
        loadReport: (reportId: string) => Promise<void>;
        switchLayout: (layoutId: string) => void;
        executeReport: () => Promise<void>;
        fetchData: (parameters?: _acorex_platform_core.AXPContextData) => Promise<_acorex_modules_report_management.AXPExecutionReportCommandResult | null>;
        updateFilterContext: (context: Record<string, any>) => void;
        clearFilters: () => void;
        resetFilters: () => void;
        exportReport: (format: string) => Promise<void>;
        refresh: () => Promise<void>;
        clearError: () => void;
        clearExecutionState: () => void;
        cancel: () => void;
        reset: () => void;
    } & _ngrx_signals.StateSource<{
        reportDefinition: _acorex_modules_report_management.AXPReportDefinition | null;
        currentLayout: _acorex_modules_report_management.AXPReportLayoutDefinition | null;
        filterContext: _acorex_platform_core.AXPContextData;
        categoriesPath: any[];
        allowFetchData: boolean;
        shouldExecuteReport: boolean;
        lastAppliedFilterContext: _acorex_platform_core.AXPContextData | null;
        hasBeenExecuted: boolean;
        status: _acorex_platform_layout_widget_core.AXPPageStatus;
        error: string | null;
        showRowIndexColumn: boolean;
    }>;
    protected readonly commandService: AXPCommandService;
    private readonly grid;
    protected handleRowClick(event: AXRowCommandItemClickEvent): void;
    protected handleDbRowClick(event: AXDataTableRowDbClick): void;
    protected handleRowAction(name: string, data: any): void;
    protected readonly layout: _angular_core.Signal<AXPReportTableLayout>;
    protected readonly dataSource: AXDataSource<any>;
    protected readonly columns: _angular_core.Signal<{
        field: string;
        title: string;
        width: number | "auto";
        visible: boolean;
        align: "left" | "right" | "center";
        widget: AXPWidgetColumnNode;
    }[]>;
    protected readonly paginationEnabled: _angular_core.Signal<boolean>;
    protected readonly primaryRowAction: _angular_core.Signal<AXRowCommandItem[]>;
    protected readonly hasPrimaryRowAction: _angular_core.Signal<boolean>;
    protected readonly secondaryRowAction: _angular_core.Signal<AXRowCommandItem[]>;
    protected readonly hasSecondaryRowAction: _angular_core.Signal<boolean>;
    protected readonly defaultRowAction: _angular_core.Signal<AXRowCommandItem | null>;
    protected convertToRowCommandItem(action: AXPReportTableLayoutRowAction): AXRowCommandItem;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPReportTableViewComponent, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXPReportTableViewComponent, "axp-report-table-view", never, {}, {}, never, never, true, never>;
}

export { AXBarChartReportMapper, AXLineChartReportMapper, AXMPermissionDefinitionProvider, AXMPermissionsKeys, AXMReportManagementModule, AXPReportBarChartViewComponent, AXPReportTableViewComponent, AXPReportViewerPageComponent, AXPReportViewerService, AXPReportViewerViewModel, AXPieChartReportMapper, RootConfig, convertContextDataToFilterClause };
export type { AXPAggregatedDataSource, AXPAggregation, AXPChartAxisConfig, AXPChartDataMapping, AXPChartInteractivity, AXPChartStyling, AXPConditionalFormatRule, AXPCustomDataSource, AXPDataTransformation, AXPExecutionReportCommand, AXPExecutionReportCommandResult, AXPExecutionReportResult, AXPLayoutDataSourceResolution, AXPLayoutExecutionContext, AXPLayoutSwitcherOption, AXPLayoutValidationResult, AXPQueryDataSource, AXPReportCategory, AXPReportChartLayout, AXPReportChartOptions, AXPReportColumn, AXPReportDataSource, AXPReportDefinition, AXPReportExecutionError, AXPReportExecutionOptions, AXPReportExecutionRequest, AXPReportExecutionStatus, AXPReportHeaderFooter, AXPReportLayout, AXPReportLayoutAction, AXPReportLayoutDefinition, AXPReportLayoutState, AXPReportLayoutType, AXPReportParameter, AXPReportParameterBinding, AXPReportParameterGroup, AXPReportPdfLayout, AXPReportPdfOptions, AXPReportSummaryOptions, AXPReportTableLayout, AXPReportTableLayoutRowAction, AXPTableOptions, AXPTransformedDataSource };
