"use client" import * as React from "react" import { Download, RefreshCw } from "lucide-react" import { toast } from "sonner" import { exportTableToExcel } from "@/lib/export" import { Button } from "@/components/ui/button" import { type Table } from "@tanstack/react-table" import { CreateShipRfqDialog } from "./create-rfq-ship-dialog" import { CreateTopRfqDialog } from "./create-rfq-top-dialog" import { CreateHullRfqDialog } from "./create-rfq-hull-dialog" interface RFQTableToolbarActionsProps { selection: Table; onRefresh?: () => void; rfqType?: "SHIP" | "TOP" | "HULL"; } export function RFQTableToolbarActions({ selection, onRefresh, rfqType = "SHIP" }: RFQTableToolbarActionsProps) { // 데이터 새로고침 const handleRefresh = () => { if (onRefresh) { onRefresh(); toast.success("데이터를 새로고침했습니다"); } } // RFQ 타입에 따른 다이얼로그 렌더링 const renderRfqDialog = () => { switch (rfqType) { case "TOP": return ; case "HULL": return ; case "SHIP": default: return ; } } return (
{/* RFQ 생성 다이얼로그 */} {renderRfqDialog()} {/* 새로고침 버튼 */} {/* 내보내기 버튼 */}
) }