import EntranceAnimation from './components/EntranceAnimation';
import StretchyAnimation from './components/StretchyAnimation';
import Shake from './components/Shake';
import { AnimateProps } from './type';
import { AnimationVariant } from './constants';

const Animate: React.FC<AnimateProps> = (props) => {
  switch (props.variant) {
    case AnimationVariant.SHAKE:
      return <Shake {...props} />;
    case AnimationVariant.ENTRANCE_ANIMATION:
      return <EntranceAnimation {...props} />;
    case AnimationVariant.STRETCHY_ANIMATION:
      return <StretchyAnimation {...props} />;
    default:
      return <>{props.children}</>;
  }
};

export default Animate;
