// node modules;
import React, { FC } from 'react';

// local components
import { TransitionShowing } from "./transition_showing";
import { OpacityShowing } from "./opacity_showing";

const animations = {
    transition: TransitionShowing,
    opacity: OpacityShowing
}

export const AnimationWrapper: FC<any> = ({ type = 'transition', ...otherProps }: any) => {
    // @ts-ignore
    const Component = animations[type] || <>{otherProps.children}</>

    return <Component {...otherProps} />
}
