'use client'

import { ArrowRight } from 'lucide-react'
import { cn } from '@/lib/utils'

type Props = {
  children: React.ReactNode
  href?: string
  variant?: 'primary' | 'outline'
  className?: string
  showArrow?: boolean
}

export function CtaButton({
  children,
  href = '#configurateur',
  variant = 'primary',
  className,
  showArrow = true,
}: Props) {
  return (
    <a
      href={href}
      className={cn(
        'inline-flex items-center justify-center gap-2 rounded-full px-6 py-3 text-sm font-semibold transition-all',
        variant === 'primary' &&
          'bg-primary text-primary-foreground hover:brightness-110 shadow-lg shadow-primary/20',
        variant === 'outline' &&
          'border border-border bg-card/40 text-foreground hover:bg-card',
        className,
      )}
    >
      {children}
      {showArrow && <ArrowRight className="size-4" />}
    </a>
  )
}
