"use client"; import React from 'react'; import { cn } from '../../lib/utils.js'; export interface ToolRowProps { domain?: string; tile?: string; icon?: React.ReactNode; title: string; meta?: string; metaColor?: string; action?: string; actionAccent?: boolean; surface?: 'light' | 'selected' | 'dark' | 'gap' | 'transparent'; onClick?: () => void; className?: string; } import { surfaces, metaColors } from '../../lib/tool-row.js'; export function ToolRow({ domain, tile, icon, title, meta, metaColor, action, actionAccent = false, surface = 'light', onClick, className }: ToolRowProps) { const onDark = surface === 'dark' || surface === 'gap'; const handleKeyDown = (event: React.KeyboardEvent) => { if (onClick && (event.key === 'Enter' || event.key === ' ')) { event.preventDefault(); onClick(); } }; return (
{icon ? ( {icon} ) : domain ? ( ) : ( {tile || 'P'} )}
{title}
{meta && (
{meta}
)}
{action && ( {action} )}
); }