"use client"; import { FileArchive, FileClock, Hash, HardDrive, ListOrdered, } from "lucide-react"; import { useI18n } from "@/i18n/i18n-context"; import { CopyableId } from "@/components/shared/copyable-id"; import type { FileMemoryItem, FileMemoryScope } from "@/types/file-memory"; import { FileVersionHistory } from "./file-version-history"; function DetailRow({ icon, label, value, }: { icon: React.ReactNode; label: string; value: React.ReactNode; }) { return (
{icon}

{label}

{value}
); } export function FileDetailsPanel({ memoryStoreName, scope, file, readOnly, onRestored, }: { memoryStoreName: string; scope: FileMemoryScope; file: FileMemoryItem | undefined; readOnly: boolean; onRestored?: (file: FileMemoryItem, content: string) => void; }) { const { t } = useI18n(); if (!file) { return (
{readOnly ? t("memory.files.selectForDetailsReadOnly") : t("memory.files.selectForDetails")}
); } return (

{t("memory.files.details")}

} label={t("memory.files.itemId")} value={ } /> } label={t("memory.files.size")} value={`${file.contentSizeBytes.toLocaleString()} B`} /> {file.mediaType ? ( } label={t("memory.files.mediaType")} value={file.mediaType} /> ) : null} } label={t("memory.files.latestVersion")} value={ } /> } label="SHA-256" value={ } /> } label={t("memory.files.updatedAt")} value={new Date(file.updatedAt).toLocaleString()} /> {!readOnly ? ( ) : null}
); }