import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "@/components/ui/card"; import { Button } from "@/components/ui/button"; import { VersionTable } from "@/components/tables/version-table"; import type { ColumnDef } from "@tanstack/react-table"; import { Plus, Shield, type LucideIcon } from "lucide-react"; import { Link } from "@tanstack/react-router"; import type { ReactNode } from "react"; interface RoleManagerTemplateProps { title: string; description: string; data: TData[]; isLoading: boolean; columns: ColumnDef[]; onTableInit?: (table: any) => void; // Optional customization icon?: LucideIcon; tableTitle?: string; tableDescription?: string; createButtonLabel?: string; createLink?: string; headerActions?: ReactNode; } export function RoleManagerTemplate({ title, description, data, isLoading, columns, onTableInit, icon: Icon = Shield, tableTitle = "Danh sách", tableDescription, createButtonLabel = "Tạo mới", createLink, headerActions, }: RoleManagerTemplateProps) { return (
{/* Header */}

{title}

{description}

{headerActions} {createLink && ( )}
{/* Table */} {tableTitle} {tableDescription && ( {tableDescription} )}
); }