import { TabItem } from "../../core/Tab/Tab.type"; import { RefObject } from "react"; /** * Tab 自适应布局 Hook * * 根据可用空间自动计算哪些 tab 需要隐藏到"更多"菜单中。 * 当容器尺寸变化、tabs 列表变化或 selectedKey 变化时,会自动重新计算布局。 * * @param tabs - Tab 列表 * @param tabsRef - Tab 容器的 ref * @param extraSlotRef - 额外插槽的 ref(用于计算可用宽度) * @param selectedKey - 当前选中的 tab key(用于触发重新计算,当选中项在"更多"菜单中时会影响按钮宽度) * * @returns moreTabs - 需要隐藏到"更多"菜单的 tabs 列表 * * @example * ```tsx * const tabsRef = useRef(null); * const extraSlotRef = useRef(null); * const moreTabs = useTabAdaptiveLayout(tabs, tabsRef, extraSlotRef, selectedKey); * ``` */ export declare const useTabAdaptiveLayout: (tabs: TabItem[], tabsRef: RefObject, extraSlotRef: RefObject, selectedKey?: string) => TabItem[];