"use client" import * as React from "react" import { type Table } from "@tanstack/react-table" import { Download, Plus, Trash } from "lucide-react" import { Button } from "@/components/ui/button" import { type ApprovalTemplate } from "@/lib/approval-template/service" import { toast } from "sonner" import { DeleteApprovalTemplateDialog } from "./delete-approval-template-dialog" import { CategoryManagementDialog } from "./category-management-dialog" interface ApprovalTemplateTableToolbarActionsProps { table: Table onCreateTemplate: () => void } export function ApprovalTemplateTableToolbarActions({ table, onCreateTemplate, }: ApprovalTemplateTableToolbarActionsProps) { const [showDeleteDialog, setShowDeleteDialog] = React.useState(false) const [showCategoryDialog, setShowCategoryDialog] = React.useState(false) const selectedRows = table.getFilteredSelectedRowModel().rows const selectedTemplates = selectedRows.map((row) => row.original) return (
{/* 카테고리 관리 버튼 */} {/* 새 템플릿 버튼 */} {/* 새 템플릿 버튼 */} {/* 일괄 삭제 */} {selectedTemplates.length > 0 && ( <> { table.toggleAllRowsSelected(false) setShowDeleteDialog(false) }} /> )}
) }