"use client";
import { jsx as _jsx } from "react/jsx-runtime";
import { forwardRef } from "react";
import { DEFAULT_SLIDE_TRANSITION_TIMEOUT, useSlideTransition } from "./useSlideTransition.js";
/**
 * **Client Component**
 *
 * A reasonable default for handling a slide transition using
 * {@link useSlideTransition}.
 *
 * @see {@link SlideContainer} for example usage.
 * @remarks \@since 6.0.0
 */ export const Slide = /*#__PURE__*/ forwardRef(function Slide(props, nodeRef) {
    const { active, appear, enter, exit, onEnter, onEntering, onEntered, onExit, onExiting, onExited, className, children, timeout = DEFAULT_SLIDE_TRANSITION_TIMEOUT, temporary = false, exitedHidden = true, ...remaining } = props;
    const { rendered, elementProps } = useSlideTransition({
        nodeRef,
        appear,
        enter,
        exit,
        onEnter,
        onEntering,
        onEntered,
        onExit,
        onExiting,
        onExited,
        className,
        timeout,
        temporary,
        transitionIn: active,
        exitedHidden
    });
    if (!rendered) {
        return null;
    }
    return /*#__PURE__*/ _jsx("div", {
        ...remaining,
        ...elementProps,
        children: children
    });
});

//# sourceMappingURL=Slide.js.map