'use client';

import { Zap } from 'lucide-react';
import Link from 'next/link';
import { useLanguage } from '@/lib/i18n';

interface QuotaPaywallProps {
  feature?: string;
  onDismiss?: () => void;
}

export function QuotaPaywall({ feature: _feature, onDismiss }: QuotaPaywallProps) {
  const { t } = useLanguage();

  return (
    <div className="rounded-xl border border-[#D4A373]/40 bg-[#D4A373]/5 p-5 space-y-3">
      <div className="flex items-start gap-3">
        <div className="mt-0.5 flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-[#D4A373]/20">
          <Zap className="h-4 w-4 text-[#D4A373]" />
        </div>
        <div className="space-y-1">
          <p className="text-sm font-semibold text-foreground">
            {t('billing.upgradeToPro')}
          </p>
          <p className="text-xs text-muted-foreground">
            {t('billing.proDescription')}
          </p>
        </div>
      </div>
      <div className="flex items-center gap-3">
        <Link
          href="/settings/billing"
          className="px-4 py-1.5 text-xs font-medium rounded-lg bg-[#D4A373] text-white hover:bg-[#C49363] transition-colors"
        >
          {t('billing.startCheckout')}
        </Link>
        {onDismiss && (
          <button
            type="button"
            onClick={onDismiss}
            className="text-xs text-muted-foreground hover:text-foreground transition-colors"
          >
            {t('common.later') ?? 'Later'}
          </button>
        )}
      </div>
    </div>
  );
}
