import React from 'react'; /** * SwipeAction 列表上下文 * * 用于在 FlatList/ScrollView 列表中,让 DbSwipeAction 组件能够 * 在水平滑动时自动禁用父级列表的滚动,从而解决手势冲突问题。 * 同时支持多个 SwipeAction 之间的互斥(打开一个时自动关闭其他)。 */ export interface SwipeListContextType { /** 控制父级列表的滚动启用/禁用 */ setScrollEnabled: (enabled: boolean) => void; /** 注册一个 SwipeAction 的关闭函数 */ registerSwipeable: (id: string, closeFn: () => void) => void; /** 注销一个 SwipeAction */ unregisterSwipeable: (id: string) => void; /** 打开某个 SwipeAction 时,关闭其他所有 */ closeOthers: (currentId: string) => void; } export declare const SwipeListContext: any; /** * 使用 SwipeList 上下文 */ export declare function useSwipeListContext(): any; /** * SwipeListProvider - 包裹 FlatList/ScrollView 以支持内部 DbSwipeAction 的手势协调 * * @example * ```tsx * const listRef = useRef(null); * * * * * ``` */ export declare function SwipeListProvider({ children, listRef, }: { children: React.ReactNode; listRef: React.RefObject; }): JSX.Element;