import { default as React } from 'react'; import { DrawerStatus as DrawerStatusType } from '../types/drawerStatus'; import { DrawerVariant } from '../types/DrawerVariant'; /** * Drives the drawer panel open/close animation with the Web Animations API. * * The panel's `transform`/`opacity` are owned entirely by JS here (CSS only * provides the resting closed position), so there is no `!important` cascade * fight and host `transition: none` resets cannot break the animation. Open and * close both resolve via the `finished` promise, replacing the old * `transitionend` + 800ms timeout bookkeeping. * @param {object} params - Hook params. * @param {boolean} params.isOpen - Whether the drawer should be open. * @param {boolean} params.isDragging - Whether a drag is active. * @param {DrawerStatusType} params.status - Current drawer status. * @param {(status: DrawerStatusType) => void} params.setStatus - Status setter. * @param {DrawerVariant} params.variant - Rendering variant. * @param {number} params.panelMountSignal - Increments when the portal panel mounts. * @param {React.RefObject | null>} params.drawerRefForTransition - Stored drawer ref. * @param {React.MutableRefObject} params.currentAnimationRef - Tracks the in-flight animation for cancellation. * @param {React.MutableRefObject} params.hasStartedOpenTransitionRef - Guards the open animation against re-running. * @param {React.MutableRefObject} params.hasCalledOnClosedRef - Guards the onClosed callback. * @param {() => void} [params.onClosed] - Optional callback when fully closed. * @returns {void} Nothing. */ export declare const useDrawerMotion: ({ currentAnimationRef, drawerRefForTransition, hasCalledOnClosedRef, hasStartedOpenTransitionRef, isDragging, isOpen, onClosed, panelMountSignal, setStatus, status, variant, }: { isOpen: boolean; isDragging: boolean; status: DrawerStatusType; setStatus: (status: DrawerStatusType) => void; variant: DrawerVariant; panelMountSignal: number; drawerRefForTransition: React.RefObject | null>; currentAnimationRef: React.MutableRefObject; hasStartedOpenTransitionRef: React.MutableRefObject; hasCalledOnClosedRef: React.MutableRefObject; onClosed?: () => void; }) => void; export default useDrawerMotion; //# sourceMappingURL=useDrawerMotion.d.ts.map