"use client";

import dynamic from "next/dynamic";
import type { ComponentProps } from "react";

type IllustrationProps = ComponentProps<
  typeof import("./SupportOverview").default
>;

function IllustrationSkeleton() {
  return (
    <div
      className="min-h-100 w-full animate-pulse rounded-3xl bg-[#F2F4FF]/80"
      aria-hidden="true"
    />
  );
}

const SupportOverview = dynamic(() => import("./SupportOverview"), {
  ssr: false,
  loading: () => <IllustrationSkeleton />,
});

/** Loads the heavy dashboard SVG in a separate chunk after first paint. */
export default function LazySupportOverview(props: IllustrationProps) {
  return <SupportOverview {...props} />;
}
