"use client";

import { Heading } from "@/components/ui/heading";
import { Separator } from "@/components/ui/separator";
import React from "react";
import { DataTable } from "./data-table";
import { columns } from "./columns";
import Link from "next/link";
import { Plus } from "lucide-react";
import { buttonVariants } from "@/components/ui/button";
import { Skill } from "@/types/skill";

const ToolsTable = ({ skillsData }: { skillsData: Skill[] }) => {
  return (
    <>
      <div className="flex items-start justify-between">
        <Heading
          title={`Skills (${skillsData.length})`}
          description="Manage Skills"
        />
        <Link
          href="/dashboard/skills/add"
          className={buttonVariants({
            variant: "default",
            // size: "sm",
          })}
          // className="text-xs md:text-sm"
          // onClick={() => router.push(`/admin-dashboard/tools/add`)}
        >
          <Plus className="mr-2 h-4 w-4" /> Add Skill
        </Link>
      </div>
      <Separator />
      <DataTable data={skillsData} columns={columns} />
    </>
  );
};

export default ToolsTable;
