/*!
 * Copyright 2020 VMware, Inc.
 * SPDX-License-Identifier: BSD-2-Clause
 */
import { TrackByFunction } from '@angular/core';
import { ActionDisplayConfig, ActionItem, ActionStyling } from '../common/interfaces';
/**
 * To add default values to configs if they are not provided by the caller in the input config
 */
export declare function getDefaultActionDisplayConfig(cfg?: ActionDisplayConfig): ActionDisplayConfig;
/**
 * Renders actions in screens containing grids, cards and details container screens
 * R is the type of selected entity on which the action will be performed
 * T is the type of custom data passed to action handler methods
 */
export declare class ActionMenuComponent<R, T> {
    /**
     * List of actions containing both static and contextual that are given by the calling component
     */
    set actions(actions: ActionItem<R, T>[]);
    private _actions;
    get actions(): ActionItem<R, T>[];
    /**
     * Used by the {@link EntityActionExtensionComponentsDirective} to provide the extension actions from plugins after
     * they are created asynchronously
     * @param val List of extension actions
     */
    set extensionEntityActions(val: ActionItem<unknown, unknown>[]);
    private _extensionEntityActions;
    private _actionDisplayConfig;
    /**
     * Display configuration of both static and contextual actions
     * If null or undefined is passed, default config {@link _actionDisplayConfig} is used
     */
    set actionDisplayConfig(config: ActionDisplayConfig);
    get actionDisplayConfig(): ActionDisplayConfig;
    /**
     * When there are no nested actions and if all of the contextual actions are marked to be featured, there is no need to show
     * the contextual actions dropdown in the inline actions container
     */
    shouldDisplayContextualActionsDropdownInline: boolean;
    /**
     * This flag is for the parent to say to the action menu that it is already calculating the actions availability and
     * telling it not to calculate the availability
     */
    set calculateActionsAvailability(val: boolean);
    private _calculateActionsAvailability;
    get calculateActionsAvailability(): boolean;
    /**
     * Text Content of the action menu dropdown trigger button. Used when {@link #actionDisplayConfig} styling is
     * {@link ActionStyling.DROPDOWN}
     */
    dropdownTriggerBtnText: string;
    /**
     * Text Content of the action menu dropdown trigger button inside the .inline-actions-container
     */
    inlineDropdownTriggerBtnText: string;
    /**
     * Icon of the action menu dropdown trigger button. Used when {@link #actionDisplayConfig} styling is
     * {@link ActionStyling.DROPDOWN}
     */
    dropdownTriggerBtnIcon: string;
    /**
     * Used for disabling the menu bar or menu dropdown
     */
    disabled: boolean;
    /**
     * The list of entities selected on which contextualActions are performed. As they are also used for calculating the
     * availability of actions, action lists are updated
     */
    set selectedEntities(val: R[]);
    private _selectedEntities;
    get selectedEntities(): R[];
    /**
     * The direction with respect to the root dropdown trigger button in which the root drop down should open
     * {@link DropdownComponent.dropdownPosition}
     */
    dropdownPosition: string;
    /**
     * The direction in which the nested drop downs open. {@link DropdownComponent.nestedDropdownPosition}
     */
    nestedDropdownPosition: string;
    /**
     * If a icon should be displayed inside contextual buttons
     */
    shouldShowIcon: boolean;
    /**
     * If a text should be displayed inside contextual buttons
     */
    shouldShowText: boolean;
    /**
     * If the contextual buttons with icons should have a tooltip
     */
    shouldShowTooltip: boolean;
    /**
     * Used in the html template
     */
    actionStyling: typeof ActionStyling;
    /**
     * List of actions that are marked as {@link ActionType.STATIC_FEATURED} only
     */
    staticFeaturedActions: ActionItem<R, T>[];
    /**
     * Actions that depend on selected entities and belong to main menu list. The returned list length is less than or
     * equal to the configured featured count in {@link actionDisplayConfig}
     */
    contextualFeaturedActions: ActionItem<R, T>[];
    /**
     * All the actions that depend on selected entities
     */
    contextualActions: ActionItem<R, T>[];
    /**
     * List containing all the static actions. It has static featured actions in the beginning of the list followed by
     * non-featured static actions as children of grouped action called 'vcd.cc.action.menu.all.actions'
     */
    staticDropdownActions: ActionItem<R, T>[] | object;
    /**
     * List of only the actions that are marked as {@link ActionType.STATIC}
     */
    staticActions: ActionItem<R, T>[];
    /**
     * To show or hide the container elements containing inline and also dropdown actions
     */
    shouldDisplayActionsInline: boolean;
    /**
     * To show or hide {@link ActionType.CONTEXTUAL} and {@link ActionType.CONTEXTUAL_FEATURED} actions in inline
     * action container
     */
    shouldDisplayContextualActionsInline: boolean;
    /**
     * To show or hide {@link ActionType.STATIC_FEATURED} actions in inline action container
     */
    shouldDisplayStaticFeaturedActionsInline: boolean;
    /**
     * To show or hide {@link ActionType.STATIC} actions in inline action container
     */
    shouldDisplayStaticActionsInline: boolean;
    /**
     * To show or hide {@link ActionType.STATIC_FEATURED} and {@link ActionType.STATIC} actions in a dropdown
     */
    shouldDisplayStaticAndStaticFeaturedActionsDropdown: boolean;
    /**
     * To show or hide {@link ActionType.CONTEXTUAL} and {@link ActionType.CONTEXTUAL_FEATURED} actions in a dropdown
     */
    shouldDisplayContextualActionsDropdown: boolean;
    /**
     * Returns the actions to be shown
     */
    getAvailableActions(actions: ActionItem<R, T>[]): ActionItem<R, T>[];
    private updateActionListsAndDisplayFlags;
    private updateActionDisplayFlags;
    /**
     * An action whose availability is false but has the disabled state set to true is still shown on the screen in
     * disabled mode
     */
    private isActionAvailable;
    private getStaticFeaturedActions;
    private getContextualFeaturedActions;
    private getStaticActions;
    private getStaticDropdownActions;
    private getContextualActions;
    /**
     * Extracts the nested actions that are marked as featured and returns them as part of a flat list
     */
    private getFlattenedActionList;
    /**
     * Execute the {@link ActionItem.handler} function by passing it {@link #selectedEntities} and
     * {@link ActionItem.handlerData} as arguments
     */
    runActionHandler(action: ActionItem<R, T>): void;
    /**
     * To disable a displayed action
     */
    isActionDisabled(action: ActionItem<R, T>): boolean;
    /**
     * Used as {@link ngForTrackBy} input value when iterating over action lists {@link DropdownComponent.trackByFunction}
     * Without this method as input for ngForTrackBy, the dropdown gets rendered off screen
     */
    actionsTrackBy: TrackByFunction<ActionItem<R, T>>;
    private getShouldDisplayActionsInline;
    private shouldDisplayStaticFeaturedActions;
    private shouldDisplayStaticActions;
    private shouldDisplayContextualActions;
}
/**
 * Without the deep copy, the changes made to any of the action children in one of the methods will persist in other methods
 */
export declare function getDeepCopyOfActionItems<R, T>(actions: ActionItem<R, T>[]): ActionItem<R, T>[];
