import { ExpandState, LevelType } from '../types'; /** * useExpand Hook 参数 */ interface UseExpandProps { /** 初始展开状态 */ initialExpand?: Partial; } /** * useExpand Hook 返回值 */ interface UseExpandReturn { /** 展开状态 */ expand: ExpandState; /** 设置展开状态 */ setExpand: (state: ExpandState) => void; /** 切换指定层级的展开状态 */ toggleExpand: (level: LevelType) => void; /** 获取指定层级的展开状态 */ getExpand: (level: LevelType) => boolean; closeAll: () => void; } /** * Tabbar 展开状态管理 Hook * 用于管理多层级的展开/收起状态 * * @param props - Hook 配置参数 * @returns 展开状态和操作方法 * * @example * ```tsx * const { expand, toggleExpand, getExpand } = useExpand({ * initialExpand: { level1: false } * }); * * * ``` */ declare const useExpand: (props?: UseExpandProps) => UseExpandReturn; export default useExpand;