import { Transition } from 'react-transition-group';
import React from 'react';
import classNames from 'classnames';
export function Rotate({ children, timeout, deg: degProp, ...rest }) {
    const { type: Component, props: childProps } = children;
    return (React.createElement(Transition, { timeout: timeout, ...rest }, (status) => {
        const deg = status === 'exited' || status === 'exiting' ? degProp : 0;
        const style = {
            transitionProperty: 'transform',
            transitionDuration: `${timeout}ms`,
            transitionTimingFunction: 'ease-in',
            transform: `rotate(${deg}deg)`,
            ...rest.style,
            ...childProps.style,
        };
        return (React.createElement(Component, { ...childProps, className: classNames(childProps.className, rest.className), style: style }));
    }));
}
//# sourceMappingURL=Rotate.js.map