"use client";
import { useCSSTransition } from "./useCSSTransition.js";
/**
 * The default cross fade transition timeout.
 *
 * @since 2.0.0
 * @since 6.0.0 Renamed from `CROSS_FADE_TIMEOUT` to
 * `DEFAULT_CROSS_FADE_TIMEOUT`
 */ export const DEFAULT_CROSS_FADE_TIMEOUT = {
    appear: 300,
    enter: 300,
    exit: 0
};
/**
 * The default cross fade transition classes to use.
 *
 * @since 2.0.0
 * @since 6.0.0 Renamed from `CROSS_FADE_CLASSNAMES` to
 * `DEFAULT_CROSS_FADE_CLASSNAMES`.
 */ export const DEFAULT_CROSS_FADE_CLASSNAMES = {
    appear: "rmd-cross-fade",
    appearActive: "rmd-cross-fade--active",
    enter: "rmd-cross-fade",
    enterActive: "rmd-cross-fade--active"
};
/**
 * This hook is used to create a "cross fade" transition -- a transition that
 * gradually increases the opacity and transforms the element vertically a short
 * distance. This is generally used for full page transitions when a route
 * changes.
 *
 * @see {@link https://react-md.dev/hooks/use-cross-fade-transition | useCrossFadeTransition Demos}
 * @see {@link https://react-md.dev/components/cross-fade | CrossFade Demos}
 * @typeParam E - An HTMLElement type used for the ref required for the
 * transition.
 * @since 4.0.0
 */ export function useCrossFadeTransition(options = {}) {
    const { appear = false, transitionIn = true, timeout = DEFAULT_CROSS_FADE_TIMEOUT, classNames = DEFAULT_CROSS_FADE_CLASSNAMES, ...cssOptions } = options;
    return useCSSTransition({
        ...cssOptions,
        appear,
        timeout,
        classNames,
        transitionIn
    });
}

//# sourceMappingURL=useCrossFadeTransition.js.map