import { ShieldAlert } from 'lucide-react' import { cn } from '@/lib/utils' import type { ScriptTemplateListItem } from '@/types' const COMPLEXITY_CLASSES: Record = { beginner: 'text-success bg-success-dim', intermediate: 'text-warning bg-warning-dim', advanced: 'text-danger bg-danger-dim', } 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} )}
)}
) }