interface TerminalLineProps {
  variant?: 'solid' | 'dashed' | 'dotted' | 'double'
  label?: string
}

export function TerminalLine({ variant = 'solid', label }: TerminalLineProps) {
  const borderStyle = {
    solid: 'border-solid',
    dashed: 'border-dashed',
    dotted: 'border-dotted',
    double: 'border-double border-b-2',
  }[variant]

  if (label) {
    return (
      <div className="flex items-center gap-2 my-2 select-none w-full">
        <div className={`flex-1 border-t border-slate-800 ${borderStyle}`} />
        <span className="text-[10px] text-slate-500 uppercase tracking-widest font-bold whitespace-nowrap">
          {label}
        </span>
        <div className={`flex-1 border-t border-slate-800 ${borderStyle}`} />
      </div>
    )
  }

  return (
    <div
      className={`w-full border-t border-slate-800 my-2 ${borderStyle} select-none`}
    />
  )
}
