import { ReactNode } from "react";
import dynamic from "next/dynamic";

// Load animation + social bubble after the page is interactive — no SSR needed
const AnimationProvider = dynamic(() => import("@/common/AnimationProvider"), {
  ssr: false,
});
const SocialBubble = dynamic(() => import("@/common/SocialBubble"), {
  ssr: false,
});
const CookieConsent = dynamic(() => import("@/components/CookieConsent"), {
  ssr: false,
});

interface WrapperProps {
  children: ReactNode;
}

const Wrapper = ({ children }: WrapperProps) => {
  return (
    <>
      {children}
      <AnimationProvider />
      <SocialBubble />
      <CookieConsent />
    </>
  );
};

export default Wrapper;
