import { RouteLoading } from "@/components/molecules/RouteLoading";
import { ChatBubbleLeftRightIcon } from "@heroicons/react/24/outline";
import { Skeleton } from "@/components/atoms/loading-skeleton";

export default function SupportCaseDetailLoading() {
  return (
    <RouteLoading
      icon={<ChatBubbleLeftRightIcon />}
      title="Support Case"
      description="Loading case details..."
      mode="content"
    >
      <div className="space-y-6 max-w-4xl">
        {/* Back link */}
        <Skeleton className="h-4 w-24" />

        {/* Case header */}
        <div className="space-y-3">
          <Skeleton className="h-8 w-64" />
          <div className="flex gap-2">
            <Skeleton className="h-6 w-20 rounded-full" />
            <Skeleton className="h-6 w-24 rounded-full" />
          </div>
        </div>

        {/* Case details card */}
        <div className="bg-card border border-border rounded-2xl p-6 space-y-4">
          <div className="grid grid-cols-2 md:grid-cols-4 gap-4">
            {Array.from({ length: 4 }).map((_, i) => (
              <div key={i} className="space-y-2">
                <Skeleton className="h-3 w-16" />
                <Skeleton className="h-5 w-24" />
              </div>
            ))}
          </div>
          <div className="pt-4 border-t border-border space-y-2">
            <Skeleton className="h-4 w-20" />
            <Skeleton className="h-4 w-full" />
            <Skeleton className="h-4 w-3/4" />
          </div>
        </div>

        {/* Comments section */}
        <div className="bg-card border border-border rounded-2xl p-6 space-y-4">
          <Skeleton className="h-5 w-24" />
          <div className="space-y-4">
            {Array.from({ length: 3 }).map((_, i) => (
              <div key={i} className="flex gap-3">
                <Skeleton className="h-8 w-8 rounded-full shrink-0" />
                <div className="flex-1 space-y-2">
                  <Skeleton className="h-4 w-32" />
                  <Skeleton className="h-4 w-full" />
                  <Skeleton className="h-4 w-2/3" />
                </div>
              </div>
            ))}
          </div>
        </div>
      </div>
    </RouteLoading>
  );
}
