import type { KeyboardEvent, MouseEvent, MouseEventHandler, ReactElement, ReactNode, Ref, RefObject } from 'react';
import type { AsProp, BaseProps, ForwardProps, NoChildrenProp } from '../../types';
import type { ImageProps } from '../Image';
import type { ProgressProps } from '../Progress';
import type { SearchInputProps } from '../SearchInput';
import type { MenuItemProps } from '../Menu';
/** AppShell props */
export interface AppInfoProps {
    /** The primary text to render in the header. */
    appName: string;
    /** If true, the appName will not be visibly displayed on screen. */
    appNameHidden?: boolean;
    /** The source for a small application image or logo that is rendered in the nav bar. */
    imageSrc: ImageProps['src'];
    /** The alt text for the image. Defaults to "Application logo" */
    imageAltText?: string;
    /** The source for the full size application image or logo that is rendered in the app header, if enabled. */
    fullImageSrc?: ImageProps['src'];
    /** URL or DOM id to navigate to. */
    href?: string;
    /** Click handler for the header. */
    onClick?: MouseEventHandler<HTMLAnchorElement>;
    /** The secondary text to render in the header. */
    portalName?: string;
    /** Specifies where to open the link href. */
    target?: string;
}
export interface ContextItem extends Pick<MenuItemProps, 'id' | 'primary' | 'visual' | 'href'> {
    selected: MenuItemProps['selected'];
}
interface ContextSwitcherOptions extends BaseProps {
    /** Application contexts available to user. */
    contexts: ContextItem[];
    /** Callback on click of item in context switcher. */
    onContextClick: (id: MenuItemProps['id'], e: MouseEvent<HTMLButtonElement | HTMLAnchorElement | HTMLInputElement | HTMLDivElement>) => void;
    /** Label of context being modified; i.e: "Switch Application", "Switch Studio"
     * @default 'Switch to…'
     */
    label?: string;
}
export type ContextSwitcherProps = ContextSwitcherOptions | Record<string, never>;
export interface AppShellProps extends BaseProps, NoChildrenProp {
    /** Props related to the App Shell header. */
    appInfo: AppInfoProps;
    /** The content of the application. */
    main: ReactNode;
    /** The active user of the application. */
    operator: OperatorProps;
    /** If true, a header will render containing the logo and name of the app as well as search and operator regions. */
    appHeader?: boolean;
    /** Context switcher configuration. */
    contextSwitcher?: ContextSwitcherProps;
    /** If true, the search results page will replace the search input in the app header with its own */
    searchPage?: boolean;
    /** Props related to the Search Input. */
    searchInput?: SearchInputProps;
    /**
     * The aria-label for the search input.
     * @default 'Sitewide'
     */
    searchLabel?: string;
    /** A set of cases that will render in an expanded list within the App Shell. */
    caseTypes?: CaseTypeProps[];
    /** A set of links that will render as a flat list in the App Shell. */
    links?: LinkProps[];
    /** A set of cases that will render as a flat list in the App Shell. */
    cases?: CaseProps[];
    /** Place the main content of the application into a loading state by way of a boolean or a custom message. */
    progress?: boolean | ProgressProps['message'];
    /** A set of app utilities like notifications, recents that renders at the bottom of AppShell */
    utils?: (UtilItemProps | ReactElement)[];
    /** Banners will render above the main content if they are provided. */
    banners?: ReactNode;
    defaultExpanded?: boolean;
    /** When the navigation is collapsed menus will be shown on hover instead of on click */
    collapsedHoverMenus?: boolean;
}
export interface CaseTypeProps {
    /** The display name of the case. */
    name: string;
    /** Click handler for the case. */
    onClick?: MouseEventHandler<HTMLButtonElement>;
}
export interface LinkProps extends ForwardProps {
    /** Unique id */
    id: string;
    /** The display name of the link. */
    name: string;
    /** URL or DOM id to navigate to. */
    href: string;
    /** The name of the Cosmos Icon to render as a visual. */
    icon?: string;
    /** Determines if the link represents the active page. */
    active?: boolean;
    /** A set of nested links. */
    links?: LinkProps[];
    /** Click handler for the link. */
    onClick?: MouseEventHandler<HTMLAnchorElement>;
}
export interface CaseProps extends ForwardProps {
    /** Unique id */
    id: string;
    /** Name of the case or some primary information like title. */
    primary: string;
    /** Additional info of a case like timestamp. */
    secondary?: string;
    /** Presents short, quickly identifiable info to a user for a collapsed nav item. */
    collapsedItemInfo?: string;
    /** A visual element identifying the case. If not passed will render case-solid icon */
    visual?: ReactNode;
    /** Determines if the case represents the active page. */
    active?: boolean;
    /** Click handler for the case . */
    onClick?: MouseEventHandler<HTMLElement>;
    /** Dismiss handler for the case. */
    onDismiss?: MouseEventHandler<HTMLElement>;
}
export interface OperatorProps {
    /** A visual element identifying the operator. */
    avatar: ReactNode;
    /** A list of actions that will populate a menu attached to the operator. */
    actions: Pick<NavListItemProps, 'id' | 'primary' | 'href' | 'onClick' | 'visual'>[];
    /** The name of the operator. */
    name: string;
}
export interface UtilItemProps extends Pick<NavListItemProps, 'visual' | 'actions' | 'onClick'> {
    /** The display name of an utility item. */
    name: string;
    /** Number when given displays on top-right of a given icon. */
    count?: number;
    /** View that renders on an appShell drawer onClick of an item */
    drawerView?: ReactNode;
    /** Heading for view that renders */
    drawerHeader?: string;
    /** Callback that fires on appshell drawer open */
    onDrawerOpen?: () => void;
    /** Callback that fires on appshell drawer close */
    onDrawerClose?: () => void;
}
export interface UtilsProps {
    /** Context switcher config. */
    contextSwitcher?: ContextSwitcherProps | Record<string, never>;
    /** The active user of the application. */
    operator: AppShellProps['operator'];
    /** A set of app utilities like notifications, recents that renders at the bottom of AppShell */
    items?: (UtilItemProps | ReactElement)[];
    appHeader?: boolean;
}
export interface NavListProps extends AsProp, BaseProps {
    items?: (NavListItemProps | ReactElement)[];
    nestedList?: boolean;
    collapsed?: boolean;
    id?: string;
    /** Whether the list is of single-select style options */
    singleSelect?: boolean;
}
export interface NavListItemWrapperProps extends ForwardProps {
    label: string;
    tooltipLabel: string;
    content?: ReactNode;
    items?: NavListItemProps[];
    onMenuToggle?: (state: 'open' | 'close') => void;
    childElementRef: RefObject<HTMLElement>;
}
export interface NavListItemProps extends AsProp, BaseProps, ForwardProps, NoChildrenProp {
    id?: string;
    visual?: ReactNode;
    primary: string;
    secondary?: string;
    /** Presents short, quickly identifiable info to a user for a collapsed nav item. */
    collapsedItemInfo?: string;
    href?: string;
    onClick?: MouseEventHandler<HTMLAnchorElement | HTMLButtonElement | HTMLDivElement>;
    items?: NavListItemProps[];
    collapseItems?: boolean;
    actions?: OperatorProps['actions'];
    onDismiss?: MouseEventHandler<HTMLElement>;
    forwardedRef?: Ref<HTMLAnchorElement | HTMLDivElement | HTMLButtonElement>;
    isMenuItem?: boolean;
    /** Whether the item is a single-select option */
    singleSelect?: NavListProps['singleSelect'];
    /** Whether the item is selected */
    selected?: boolean;
}
export interface NavMenuProps extends NavListItemProps {
    forwardedRef?: Ref<HTMLButtonElement>;
}
/** AppHeader props */
export interface AppHeaderProps extends BaseProps, AppInfoProps {
    contextSwitcher?: ContextSwitcherProps | Record<string, never>;
    operator: AppShellProps['operator'];
    searchInput?: AppShellProps['searchInput'];
    searchLabel?: AppShellProps['searchLabel'];
    searchPage?: AppShellProps['searchPage'];
}
/** Drawer props */
export interface DrawerListProps {
    items: (DrawerItemProps & ForwardProps)[];
    loading?: boolean;
    viewAll?: {
        onClick?: MouseEventHandler<HTMLButtonElement | HTMLAnchorElement>;
        href?: string;
    } & ForwardProps;
    newNotifications?: number;
    onItemClick?: (id: string, event: MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void;
    onItemPinToggle?: (id: string) => void;
    onDrawerOpen?: () => void;
    onDrawerClose?: () => void;
}
export interface DrawerItemProps extends BaseProps {
    /** An id representing the item. */
    id: string;
    /** The primary text for the item. */
    primary: string;
    /** Secondary text that will be rendered as a Meta List. */
    secondary?: string[];
    /** A visual associated with the item. */
    visual?: ReactNode;
    /** A flag indicating if the item has been read. */
    unread?: boolean;
    /** A flag indicating if the item has been pinned or not. */
    pinned?: boolean;
    /** URL or DOM id to navigate to. */
    href?: string;
    /** The onClick handler for the item. */
    onClick?: (id: string, event: MouseEvent<HTMLElement> | KeyboardEvent<HTMLElement>) => void;
    /** The handler hat is called when a pin icon is toggled on an item. */
    onPinToggle?: (id: string) => void;
}
export interface ListProps extends DrawerListProps {
    headingText?: string;
    emptyText: string;
    displayRecents: boolean;
    displayPins?: boolean;
}
export {};
//# sourceMappingURL=AppShell.types.d.ts.map