import SiteBreadcrumb from "@/components/site-breadcrumb";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import BlogTable from "./components/blog-table";
import { Plus } from "lucide-react";
import { Button } from "@/components/ui/button";
import { Link } from "@/components/navigation";

const BlogPage = async () => {
  return (
    <div>
      <SiteBreadcrumb />
      <div className="space-y-4">
        <Card>
          <CardHeader className="border-b border-solid border-default-200 mb-6">
            <CardTitle>
              <div className="flex items-center">
                <div className="flex-1 text-xl font-medium text-default-900">
                  Table Indeks
                </div>
                <div className="flex-none">
                  <Link href={"/contributor/blog/create"}>
                    <Button fullWidth color="primary">
                      <Plus className="w-6 h-6 me-1.5" />
                      Add Index
                    </Button>
                  </Link>
                </div>
              </div>
            </CardTitle>
          </CardHeader>
          <CardContent className="p-0">
            <BlogTable />
          </CardContent>
        </Card>
      </div>
    </div>
  );
};

export default BlogPage;
