import { CloudOffIcon } from "lucide-react";

import { EmptyState } from "@/components/admin/empty-state";

/**
 * Shown where a page's data comes from a Laravel CMS endpoint that isn't
 * built yet (docs/laravel-blog-api.md §8.2). The page works once it is.
 */
export function CmsUnavailable({
  title = "Not available yet",
  endpoint,
  className,
}: {
  title?: string;
  endpoint: string;
  className?: string;
}) {
  return (
    <EmptyState
      icon={CloudOffIcon}
      title={title}
      className={className}
      description={
        <>
          The Laravel CMS doesn&apos;t serve this yet (
          <code className="font-mono text-xs">{endpoint}</code>). It will appear
          here as soon as the endpoint is added.
        </>
      }
    />
  );
}
