import * as H from 'history';
import * as React from 'react';
/**
 * Describes a tab.
 *
 * @template ID The type that includes all possible tab IDs (typically a union of string constants).
 */
export interface Tab<ID extends string> {
    id: ID;
    label: React.ReactFragment;
    /**
     * Whether the tab is hidden in the tab bar.
     */
    hidden?: boolean;
}
/**
 * An element to pass to Tab's tabBarEndFragment prop to fill all width between the tabs (on the left) and the
 * other tabBarEndFragment elements (on the right).
 */
export declare const Spacer: () => JSX.Element;
/**
 * Properties for the Tabs components and its wrappers.
 *
 * @template ID The type that includes all possible tab IDs (typically a union of string constants).
 * @template T The type that describes a tab.
 */
interface TabsProps<ID extends string, T extends Tab<ID>> {
    /** All tabs. */
    tabs: T[];
    /**
     * A fragment to display at the end of the tab bar. If specified, the tabs will not flex grow to fill the
     * width.
     */
    tabBarEndFragment?: React.ReactFragment;
    children: React.ReactFragment;
    id?: string;
    className?: string;
    tabClassName?: string;
    /** Optional handler when a tab is selected */
    onSelectTab?: (tab: ID) => void;
}
/**
 * The class name to use for other elements injected via tabBarEndFragment that should have a bottom border.
 */
export declare const TabBorderClassName = "tab-bar__end-fragment-other-element";
/**
 * A wrapper for Tabs that persists view state (the currently active tab) in localStorage.
 */
export declare class TabsWithLocalStorageViewStatePersistence<ID extends string, T extends Tab<ID>> extends React.PureComponent<TabsProps<ID, T> & {
    /**
     * A key unique to this UI element that is used for persisting the view state.
     */
    storageKey: string;
}, {
    activeTab: ID | undefined;
}> {
    constructor(props: TabsProps<ID, T> & {
        storageKey: string;
    });
    private static readFromLocalStorage;
    private static saveToLocalStorage;
    render(): JSX.Element | null;
    private onSelectTab;
    private renderTab;
}
interface TabsWithURLViewStatePersistenceProps<ID extends string, T extends Tab<ID>> extends TabsProps<ID, T> {
    location: H.Location;
}
/**
 * A wrapper for Tabs that persists view state (the currently active tab) in the current page's URL.
 *
 * URL whose fragment (hash) ends with "$x" are considered to have active tab "x" (where "x" is the tab's ID).
 */
export declare class TabsWithURLViewStatePersistence<ID extends string, T extends Tab<ID>> extends React.PureComponent<TabsWithURLViewStatePersistenceProps<ID, T>, {
    activeTab: ID | undefined;
}> {
    constructor(props: TabsWithURLViewStatePersistenceProps<ID, T>);
    /**
     * Returns the URL hash (which can be used as a relative URL) that specifies the given tab. If the URL hash
     * already contains a tab ID, it replaces it; otherwise it appends it to the current URL fragment. If the tabID
     * argument is null, then the tab ID is removed from the URL.
     */
    static urlForTabID(location: H.Location, tabID: string | null): H.LocationDescriptorObject;
    private readFromURL;
    componentWillReceiveProps(nextProps: TabsWithURLViewStatePersistenceProps<ID, T>): void;
    render(): JSX.Element | null;
    private renderTab;
}
export {};
//# sourceMappingURL=Tabs.d.ts.map