import { ReactElement, ReactNode } from 'react';
import { Component } from '../component';
import { Flex } from '../flex';
import { SelectorProps } from './Selector';
import { RenderProp, Tab } from './types';
import { ContextValue } from './useContext';
/**
 * Checks if the selected tab key exists in the tabs array. If it does not, it returns
 * the last tab key in the array. If the array is empty, it returns undefined. This
 * function is useful for 'resetting' the selected tab when a tab is removed that may
 * be the currently selected tab.
 *
 * @param selected The currently selected tab key.
 * @param tabs The array of tabs to search through.
 * @returns The selected tab key or undefined if the array is empty.
 */
export declare const resetSelection: (selected?: string, tabs?: Tab[]) => string | undefined;
/**
 * Finds the tab with the given key and renames it to the given name, shallowly copying
 * the array and the tab object.
 * @param key The key of the tab to rename.
 * @param name The new name of the tab.
 * @param tabs The array of tabs to search through.
 * @returns A new array of tabs with the renamed tab.
 */
export declare const rename: (key: string, name: string, tabs: Tab[]) => Tab[];
/** Props for the {@link useStatic} hook. */
export interface UseStaticTabsProps {
    tabs: Tab[];
    content?: RenderProp;
    onSelect?: (key: string) => void;
    selected?: string;
}
/**
 * A utility hook for creating a static set of tabs. This hook is useful when the list
 * of tabs you'd like to display and switch between is known ahead of time and is not
 * dynamically adjusted.
 *
 * @param tabs The array of tabs to display.
 * @param content An optional render prop to display the content of the selected tab
 * instead of pulling from the 'content' property of the tab object.
 * @pram onSelect An optional callback to be called when a tab is selected.
 * @param selected The key of the tab to be selected by default.
 * @returns props to pass to the {@link Tabs} component.
 */
export declare const useStatic: ({ tabs, content, selected, onSelect, }: UseStaticTabsProps) => ContextValue;
/** Props for the {@link Tabs} component. */
export interface TabsProps extends Omit<Flex.BoxProps, "children" | "onSelect" | "size" | "onDragStart" | "onDragEnd" | "content" | "contextMenu" | "onDrop">, ContextValue, Pick<SelectorProps, "addTooltip" | "contextMenu" | "onDrop" | "actions">, Pick<Flex.BoxProps, "direction" | "x" | "y"> {
    children?: RenderProp | ReactNode;
    size?: Component.Size;
    selectedAltColor?: boolean;
}
/**
 * High-level component for creating a tabbed interface. This component is a composition
 * of the {@link Selector}, {@link Content}, and {@link Context} components to provide a
 * complete tabbed interface. It's also possible to use these components individually
 * to create a custom tabbed interface.
 *
 * @param content Optional render prop to display the content of the selected tab instead
 * of using the 'content' property of the tab object. This can be a function or a React
 * element.
 * @param children The same as the 'content' prop, but as a child element. If this prop
 * is specified, it will take precedence over the 'content' prop.
 * @param onSelect A callback executed when a tab is selected. The key of the selected tab
 * is passed as an argument.
 * @param selected The key of the currently selected tab.
 * @param selectedAltColor Whether to use an alternate color for the selected tab.
 * @param closable Whether to display a close button on each tab.
 * @param tabs The array of tabs to display.
 * @param onClose A callback executed when a tab is closed. The key of the tab to close is
 * passed as an argument. This callback is only executed if the tab is closable.
 * @param onDragStart A callback executed when a tab's handle is dragged. Identical to a
 * onDragStart handler in react, except the tab object is passed as the second argument.
 * @param onDragEnd A callback executed when a tab's handle stops being dragged. Identical
 * to a onDragEnd handler in react, except the tab object is passed as the second argument.
 * @param onCreate If provided, the Tabs.Selector component will display a button to create
 * a new tab. This callback is executed when that button is clicked.
 * @param onRename A callback executed when a tab is renamed.
 * @param emptyContent Content to display when no tab is selected.
 * @param className An optional class name to apply to the component.
 * @param onDragOver A callback executed when a tab is dragged over the component. Identical
 * to a onDragOver handler in react.
 * @param onDrop A callback executed when a tab is dropped. Identical to a onDrop handler in
 * react.
 * @param size The size of the tabs selector to display. Can be "small", "medium", or "large".
 * @note all other props are inherited from the {@link Flex.Box} component and are passed
 * through to that component.
 * @param direction The direction in which to show the tabs selector. An 'x' direction
 * will show the selector on the left side of the tabs, while a 'y' direction will show
 * the selector on the top side of the tabs.
 */
export declare const Tabs: ({ id, content, children, onSelect, selected, selectedAltColor, closable, tabs, onClose, onDragStart, onDragEnd, onCreate, onRename, emptyContent, className, onDragOver, onDrop, contextMenu, actions, addTooltip, size, direction: dir, x, y, ...rest }: TabsProps) => ReactElement;
export declare const Content: () => ReactNode | null;
//# sourceMappingURL=Tabs.d.ts.map