"use client";

import { useViewStore } from "@/lib/stores/view-store";
import { ListView } from "@/components/views/list";
import { BoardView } from "@/components/views/board";
import { TableView } from "@/components/views/table";
import { EmbedView } from "@/components/views/embed";

export default function ProjectPage() {
  const activeView = useViewStore((s) => s.activeView);
  const config = useViewStore((s) => s.config);

  switch (activeView) {
    case "board":
      return <BoardView config={config} />;
    case "table":
      return <TableView config={config} />;
    case "embed":
      return <EmbedView config={config} />;
    case "list":
    default:
      return <ListView config={config} />;
  }
}
