"use client"; import {AnimatePresence} from "motion/react"; import * as React from "react"; /** * Represents the configurable props for the {@link Presence} component. */ interface PresenceProps { /** * Whether the child should be mounted and visible. */ present: boolean; /** * The animated child element. */ children: React.ReactNode; /** * AnimatePresence mode. * @default "sync" */ mode?: "wait" | "sync" | "popLayout"; } /** * Simplified mount/unmount animation wrapper built on `AnimatePresence`. * * @example * ```tsx * * Content * * ``` * * @see {@link https://motion.dev/docs/react-animate-presence | motion AnimatePresence} */ function Presence({present, children, mode = "sync"}: Readonly): React.JSX.Element { return {present ? children : null}; } Presence.displayName = "Presence"; export {Presence}; export type {PresenceProps};