"use client" import React, { useState } from "react" import { Copy, Check } from "lucide-react" export interface CommandEntry { command: string description: string } export interface CommandGroup { title: string commands: CommandEntry[] } interface CommandTableProps { groups: CommandGroup[] } function CopyButton({ text }: { text: string }) { const [copied, setCopied] = useState(false) const copyToClipboard = () => { navigator.clipboard.writeText(text) setCopied(true) setTimeout(() => setCopied(false), 2000) } return ( {copied ? ( <> Copied > ) : ( <> Copy > )} ) } export const CommandTable: React.FC = ({ groups }) => { return ( {groups.map((group, gi) => ( {group.title} Command Description Action {group.commands.map((cmd, ci) => ( {cmd.command} {cmd.description} ))} ))} ) }