import { ButtonVariant } from '@patternfly/react-core';
import { ComponentClass } from 'react';
export declare const enum PageActionType {
    Button = 0,
    Link = 1,
    Switch = 2,
    Dropdown = 3,
    Seperator = 4
}
export declare const enum PageActionSelection {
    None = 0,
    Single = 1,
    Multiple = 2
}
export type IPageAction<T extends object> = IPageActionButton | IPageActionButtonSingle<T> | IPageActionButtonMultiple<T> | IPageActionLink | IPageActionLinkSingle<T> | IPageActionSwitch | IPageActionSwitchSingle<T> | IPageActionDropdown<T> | IPageActionDropdownSingle<T> | IPageActionDropdownMultiple<T> | IPageActionSeperator;
interface IPageActionCommon {
    icon?: ComponentClass;
    label: string;
    tooltip?: string;
    isDanger?: boolean;
    ouiaId?: string;
    isPinned?: boolean;
}
interface IPageActionNoneCommon extends IPageActionCommon {
    selection: PageActionSelection.None;
    isHidden?: () => boolean;
    isDisabled?: string | (() => string | undefined);
}
interface IPageActionSingleCommon<T extends object> extends IPageActionCommon {
    selection: PageActionSelection.Single;
    isHidden?: (item: T) => boolean;
    isDisabled?: string | ((item: T) => string | undefined);
}
interface IPageActionMultipleCommon<T extends object> extends IPageActionCommon {
    selection: PageActionSelection.Multiple;
    isDisabled?: string | ((items: T[]) => string | undefined);
}
export interface IPageActionButton extends IPageActionNoneCommon {
    type: PageActionType.Button;
    selection: PageActionSelection.None;
    variant?: ButtonVariant;
    onClick: () => unknown;
}
export interface IPageActionButtonSingle<T extends object> extends IPageActionSingleCommon<T> {
    type: PageActionType.Button;
    selection: PageActionSelection.Single;
    variant?: ButtonVariant;
    onClick: (item: T) => unknown;
}
export interface IPageActionButtonMultiple<T extends object> extends IPageActionMultipleCommon<T> {
    type: PageActionType.Button;
    selection: PageActionSelection.Multiple;
    variant?: ButtonVariant;
    onClick: (items: T[]) => unknown;
}
export interface IPageActionLink extends IPageActionNoneCommon {
    type: PageActionType.Link;
    href: string;
    variant?: ButtonVariant;
}
export interface IPageActionLinkSingle<T extends object> extends IPageActionSingleCommon<T> {
    type: PageActionType.Link;
    href: (item: T) => string;
    variant?: ButtonVariant;
}
export interface IPageActionSwitch extends IPageActionNoneCommon {
    type: PageActionType.Switch;
    onToggle: (enable: boolean) => unknown;
    isSwitchOn: () => boolean;
    showPinnedLabel?: boolean;
    labelOff?: string;
    isReversed?: boolean;
    ariaLabel: (isEnabled: boolean) => string;
}
export interface IPageActionSwitchSingle<T extends object> extends IPageActionSingleCommon<T> {
    type: PageActionType.Switch;
    onToggle: (item: T, enable: boolean) => unknown;
    isSwitchOn: (item: T) => boolean;
    showPinnedLabel?: boolean;
    labelOff?: string;
    isReversed?: boolean;
    ariaLabel: (isEnabled: boolean) => string;
}
export interface IPageActionDropdown<T extends object> extends IPageActionNoneCommon {
    type: PageActionType.Dropdown;
    actions: IPageAction<T>[];
    variant?: ButtonVariant;
}
export interface IPageActionDropdownSingle<T extends object> extends IPageActionSingleCommon<T> {
    type: PageActionType.Dropdown;
    actions: IPageAction<T>[];
    variant?: ButtonVariant;
}
export interface IPageActionDropdownMultiple<T extends object> extends IPageActionMultipleCommon<T> {
    type: PageActionType.Dropdown;
    actions: IPageAction<T>[];
    variant?: ButtonVariant;
}
export interface IPageActionSeperator {
    type: PageActionType.Seperator;
}
export {};
