"use client"; import { useTranslations } from "next-intl"; import { Skeleton } from "@/components/ui/skeleton"; import type { DocumentsEmptyReason } from "@/lib/documents/documents-view-model"; export function DocumentsEmptyState({ reason }: { reason: DocumentsEmptyReason }) { const t = useTranslations("documents"); if (reason.kind === "loading") { return (
{["loading-1", "loading-2", "loading-3", "loading-4", "loading-5"].map( (key, index) => (
) )}
); } const title = reason.kind === "workspace_empty" ? t("no_documents") : t("empty_no_matching_documents"); const description = reason.kind === "workspace_empty" ? t("empty_upload_files") : reason.kind === "no_search_results" ? t("empty_try_different_search") : t("empty_adjust_filters"); return (

{title}

{description}

); }