import { AdaptableColumnMenuItemName, AdaptableMenuItem, AgGridMenuItem, ColumnMenuContext, MenuSeparator } from '../AdaptableState/Common/Menu';
import { AdaptableIcon } from '../types';
/**
 * Options for managing menus in AdapTable – provided using 2 collections
 */
export interface ColumnMenuOptions<TData = any> {
    /**
     * Customises Column Menu (default column menu items are available in the provided context)
     */
    customColumnMenu?: (menuContext: CustomColumnMenuContext<TData>) => CustomColumnMenuItem[];
}
/**
 * Context info provided when building Custom Column Menus
 */
export interface CustomColumnMenuContext<TData = any> extends ColumnMenuContext<TData> {
    /**
     * Flat list of all available AdapTable Menu Items
     */
    defaultAdaptableMenuItems: AdaptableSystemColumnMenuItem<AdaptableColumnMenuItemName>[];
    /**
     * Flat list of all available AG Grid Menu Items
     */
    defaultAgGridMenuItems: AgGridMenuItem<AgGridColumnMenuItemType>[];
    /**
     * Default structure of Adaptable Menu Items
     */
    defaultAdaptableMenuStructure: (AdaptableSystemColumnMenuItem<AdaptableColumnMenuItemName> | MenuSeparator)[];
    /**
     * Default structure of AG Grid Menu Items
     */
    defaultAgGridMenuStructure: (AgGridMenuItem<AgGridColumnMenuItemType> | {
        menuType: 'Group';
        label: string;
        subMenuItems: AgGridMenuItem<AgGridColumnMenuItemType>[];
        disabled?: boolean;
        icon?: AdaptableIcon;
    })[];
}
/**
 * Custom Column Menu Item
 */
export type CustomColumnMenuItem = AgGridMenuItem<AgGridColumnMenuItemType> | AdaptableSystemColumnMenuItem<AdaptableColumnMenuItemName> | UserColumnMenuItem | MenuSeparator | CustomGroupColumnMenuItem;
/**
 * Defines a Grouped Menu Item in the Column Menu
 */
export type CustomGroupColumnMenuItem = {
    menuType: 'Group';
    label: string;
    subMenuItems: CustomColumnMenuItem[];
    disabled?: boolean;
    icon?: AdaptableIcon;
};
/**
 * System Menu Item that is provided by AdapTable
 */
export interface AdaptableSystemColumnMenuItem<MENU_TYPE_NAME extends AdaptableColumnMenuItemName> extends AdaptableMenuItem<MENU_TYPE_NAME> {
    /**
     * Type of Menu - always 'Adaptable'
     */
    menuType: 'Adaptable';
}
/**
 * Column Menu Item that is provided by User
 */
export interface UserColumnMenuItem {
    /**
     * Type of Menu - always 'User'
     */
    menuType: 'User';
    /**
     * Text to appear in the Menu Item
     */
    label: string;
    /**
     * Function invoked when the Menu Item is clicked
     */
    onClick?: (menuContext: ColumnMenuContext) => void;
    /**
     * Whether menu item is disabled
     */
    disabled?: boolean;
    /**
     * Whether menu item is hidden
     */
    hidden?: boolean;
    /**
     * Optional icon to display
     */
    icon?: AdaptableIcon;
    /**
     * Array of Menu Items, enabling limitless levels of menus
     */
    subMenuItems?: CustomColumnMenuItem[];
}
/**
 * Defines AG Grid Column Menu Items
 */
export type AgGridColumnMenuItemType = 'sortAscending' | 'sortDescending' | 'sortUnSort' | 'columnFilter' | 'columnChooser' | 'pinSubMenu' | 'valueAggSubMenu' | 'autoSizeThis' | 'autoSizeAll' | 'rowGroup' | 'rowUnGroup' | 'resetColumns' | 'expandAll' | 'contractAll' | 'separator';
