"use client"

import * as React from "react"
import { ClientDataTable } from "@/components/client-data-table/data-table"
import { DataTableRowAction, getColumns } from "./tag-table-column"
import { Tag as TagData } from "@/types/vendorData"
import { DataTableAdvancedFilterField } from "@/types/table"
import { AddTagDialog } from "./add-tag-dialog"

interface TagTableProps {
  data: TagData[]
}

/**
 * TagTable: Tag 데이터를 표시하는 표
 */
export function TagTable({ data }: TagTableProps) {

  const [rowAction, setRowAction] =
    React.useState<DataTableRowAction<TagData> | null>(null)

  const columns = React.useMemo(
    () => getColumns({ setRowAction }),
    [setRowAction]
  )

  const advancedFilterFields: DataTableAdvancedFilterField<TagData>[] = []

  return (
    <>
      <ClientDataTable
        data={data}
        columns={columns}
        advancedFilterFields={advancedFilterFields}
      />

    </>
  )
}