import * as React from 'react'; import { View } from 'react-native'; import type { ZestUIComponentProps } from '../../types'; import type { TransitionStatus } from '../../internals/useTransitionStatus'; import { type DrawerSnapPoint, type DrawerSwipeDirection } from '../root/DrawerRootContext'; /** * A container for the drawer contents, dismissable by swiping it away. * Renders a `` wrapped in a `GestureDetector`. * * Follows the animation contract: the popup never moves itself. It publishes how * far the swipe has travelled as `swipeMovement` on the state object, and the * consumer turns that into a transform. * * Requires `react-native-gesture-handler`, and the app to be wrapped in * ``. */ export declare function DrawerPopup(componentProps: DrawerPopup.Props): React.JSX.Element; export interface DrawerPopupState { /** * Whether the drawer is currently open. */ open: boolean; /** * The transition status of the drawer: `'starting'` as it opens (auto-clears * to `undefined` after one frame), `'ending'` once it is closing. */ transitionStatus: TransitionStatus; /** * Whether this drawer is rendered inside another dialog's tree. */ nested: boolean; /** * Whether a dialog nested inside this one is open — the cue to scale or dim * this popup, which the web version drives with a CSS variable. */ nestedDialogOpen: boolean; /** * How many drawers nested inside this one are open — the depth of the sheet * stack, so each level can recede a fixed step instead of the boolean above * collapsing every level into one. */ nestedDialogCount: number; /** * Whether a swipe is currently in progress. */ swiping: boolean; /** * How far the current swipe has travelled towards `swipeDirection`, in pixels, * and `0` whenever no swipe is in progress. Without snap points this is never * negative; with them it goes negative as the drawer is dragged open. */ swipeMovement: number; /** * The direction a swipe must travel to dismiss the drawer. */ swipeDirection: DrawerSwipeDirection; /** * The currently active snap point, or `null` when there are none. */ snapPoint: DrawerSnapPoint | null; /** * How far the active snap point pushes the popup off the edge, in pixels, or * `null` when there are no snap points. Add `swipeMovement` to it to place the * popup mid-drag. */ snapPointOffset: number | null; } export interface DrawerPopupProps extends ZestUIComponentProps { /** * How far a swipe must travel, in pixels, before it dismisses the drawer. With * snap points, how far past the most-closed one a swipe must go to dismiss * rather than snap. * @default 40 */ swipeThreshold?: number | undefined; } export declare namespace DrawerPopup { type State = DrawerPopupState; type Props = DrawerPopupProps; } //# sourceMappingURL=DrawerPopup.d.ts.map