import { ShieldAlert } from 'lucide-react' import { cn } from '@/lib/utils' import type { ScriptTemplateListItem } from '@/types' const COMPLEXITY_CLASSES: Record = { beginner: 'text-emerald-400 bg-emerald-400/10', intermediate: 'text-amber-400 bg-amber-400/10', advanced: 'text-rose-500 bg-rose-500/10', } interface Props { template: ScriptTemplateListItem onConfigure: (id: string) => void } export function TemplateCard({ template, onConfigure }: Props) { return (
{template.name}
{template.requires_elevation && ( )} {template.complexity}
{template.description && (

{template.description}

)}
{template.usage_count}× used {template.tags.length > 0 && (
{template.tags.slice(0, 3).map(tag => ( {tag} ))} {template.tags.length > 3 && ( +{template.tags.length - 3} )}
)}
) }