From fefca6304eefea94f41057f9f934b0e19ceb54bb Mon Sep 17 00:00:00 2001
From: 0-Zz-ang <s1998319@gmail.com>
Date: Fri, 22 Aug 2025 13:47:37 +0900
Subject: (박서영)Compliance 설문/응답 리스트 생성
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../responses/compliance-responses-toolbar.tsx     | 69 ++++++++++++++++++++++
 1 file changed, 69 insertions(+)
 create mode 100644 lib/compliance/responses/compliance-responses-toolbar.tsx

(limited to 'lib/compliance/responses/compliance-responses-toolbar.tsx')

diff --git a/lib/compliance/responses/compliance-responses-toolbar.tsx b/lib/compliance/responses/compliance-responses-toolbar.tsx
new file mode 100644
index 00000000..26755aee
--- /dev/null
+++ b/lib/compliance/responses/compliance-responses-toolbar.tsx
@@ -0,0 +1,69 @@
+"use client";
+
+import * as React from "react";
+import { Button } from "@/components/ui/button";
+import { Download, Trash2 } from "lucide-react";
+import { toast } from "sonner";
+import type { Table } from "@tanstack/react-table";
+
+interface ComplianceResponsesToolbarActionsProps<TData> {
+  table: Table<TData>;
+}
+
+export function ComplianceResponsesToolbarActions<TData>({
+  table,
+}: ComplianceResponsesToolbarActionsProps<TData>) {
+  const selectedRows = table.getFilteredSelectedRowModel().rows;
+
+  const handleDeleteSelected = async () => {
+    if (selectedRows.length === 0) {
+      toast.error("삭제할 응답을 선택해주세요.");
+      return;
+    }
+
+    // TODO: 선택된 응답들 삭제 기능 구현
+    console.log("Delete selected responses:", selectedRows.map(row => row.original));
+    toast.success(`${selectedRows.length}개의 응답이 삭제되었습니다.`);
+    
+    // 페이지 새로고침으로 데이터 업데이트
+    window.location.reload();
+  };
+
+  const handleExport = () => {
+    if (selectedRows.length === 0) {
+      toast.error("내보낼 응답을 선택해주세요.");
+      return;
+    }
+
+    // TODO: 선택된 응답들 내보내기 기능 구현
+    console.log("Export selected responses:", selectedRows.map(row => row.original));
+    toast.success(`${selectedRows.length}개의 응답이 내보내졌습니다.`);
+  };
+
+  return (
+    <div className="flex items-center gap-2">
+      {selectedRows.length > 0 && (
+        <>
+          <Button
+            variant="outline"
+            size="sm"
+            onClick={handleExport}
+            className="h-8"
+          >
+            <Download className="mr-2 h-4 w-4" />
+            내보내기 ({selectedRows.length})
+          </Button>
+          <Button
+            variant="destructive"
+            size="sm"
+            onClick={handleDeleteSelected}
+            className="h-8"
+          >
+            <Trash2 className="mr-2 h-4 w-4" />
+            Delete ({selectedRows.length})
+          </Button>
+        </>
+      )}
+    </div>
+  );
+}
-- 
cgit v1.2.3

