import { Dispatch, SetStateAction, SyntheticEvent } from 'react';
/**
* A custom React hook to manage the state of a tab component.
*
* @template T - The type of the tab value (e.g., string, number, or custom type).
* @param defaultValue - The initial tab value or `false` to indicate no tab is selected. Defaults to `false`.
* @returns An object containing the current tab state and methods to manipulate it.
*
* @remarks
* - Use `false` as the tab value to deselect all tabs.
* - The `onChange` handler is designed to work with tab components like Material-UI's `Tabs`.
* - The hook is memoized for performance and supports dynamic default values.
*
* @example
* ```tsx
* // Example: Using string tab values
* const { value, onChange, setValue, reset } = useTabs<'tab1' | 'tab2'>('tab1');
*
* return (
*
*
*
*
* );
*
* // Manually select a tab
* setValue('tab2');
*
* // Deselect all tabs
* setValue(false);
*
* // Reset to default value
* reset();
* ```
*
* @example
* ```tsx
* // Example: Using number tab values with no initial selection
* const { value, onChange } = useTabs<1 | 2>(false);
*
* return (
*
*
*
*
* );
* ```
*/
type UseTabsReturn = {
value: T | false;
setValue: Dispatch>;
onChange: (event: SyntheticEvent, newValue: T | false) => void;
reset: () => void;
};
declare function useTabs(defaultValue?: T | false): UseTabsReturn;
export { type UseTabsReturn, useTabs };