"use client";
import { PropsWithChildren } from "react";
import { motion } from "framer-motion";
import {
  VariantLabels,
  TargetAndTransition,
} from "framer-motion";
import type { LegacyAnimationControls } from "motion-dom";

interface IProps extends PropsWithChildren {
  initial?: any;
  animate?: VariantLabels | LegacyAnimationControls | TargetAndTransition | undefined;
  exit?: VariantLabels | TargetAndTransition | undefined;
}

const PresenceAnimator = ({ children, initial, animate, exit }: IProps) => {
  return (
    <motion.div
      className="flex flex-col justify-between min-h-[500px]"
      initial={initial}
      animate={animate}
      exit={exit}
    >
      {children}
    </motion.div>
  );
};

export default PresenceAnimator;
