"use client";
import { Plus } from "lucide-react";
import { cn } from "@/lib/utils";
import { isEmpty } from "@/lib/databases/values";
import { useDb } from "../hooks";
import { CellDisplay } from "../cells/Cell";
import { groupRows } from "../group";
import { OPTION_CLASS } from "../colors";
export function ListView() {
const ctx = useDb(); const gb = ctx.props.find((p) => p.id === ctx.view.config.groupBy); const groups = groupRows(ctx.rows, gb);
const side = ctx.visibleProps.filter((p) => p.type !== "title" && p.id !== gb?.id);
return (
{groups.map((g) => (g.rows.length || !gb) ? (
{gb &&
{g.label}{g.rows.length}
}
{g.rows.map((r) =>
)}
) : null)}
);
}