// DocumentRow.tsx
// Generic row component for displaying any document type.
import { SecretToggleRow } from "@/components/documents/secret/SecretToggleRow";
import {
isLocation,
isMonster,
isNpc,
isScene,
isSecret,
isSession,
isTreasure,
type Document,
type Session,
} from "@/lib/types";
import { BasicRow } from "./BasicRow";
import { TreasureToggleRow } from "./treasure/TreasureToggleRow";
/**
* Renders a row for any document type. Prioritizes Session, then Secret, then falls back to ID and creation time.
* If rendering a SecretRow, uses the provided session prop if available.
*/
export const DocumentRow = ({
document,
session,
}: {
document: Document;
session?: Session;
}) => {
if (isLocation(document)) {
return (