import { ChevronLeft, ChevronRight, Send } from 'lucide-react';
import { Button } from '@/components/ui';

export interface WizardNavigationProps {
  onNext: () => void;
  onPrev: () => void;
  onSubmit?: () => void;
  isFirstStep: boolean;
  isLastStep: boolean;
  isNextDisabled?: boolean;
  isSubmitting?: boolean;
}

export function WizardNavigation({
  onNext,
  onPrev,
  onSubmit,
  isFirstStep,
  isLastStep,
  isNextDisabled = false,
  isSubmitting = false,
}: WizardNavigationProps) {
  return (
    <div className="flex items-center justify-between pt-8 mt-8 border-t border-gray-100">
      <Button
        type="button"
        variant="ghost"
        onClick={onPrev}
        disabled={isFirstStep}
        className={isFirstStep ? 'invisible' : ''}
      >
        <ChevronLeft className="w-4 h-4 mr-1.5" />
        Back
      </Button>

      {isLastStep ? (
        <Button
          type="button"
          variant="primary"
          size="lg"
          onClick={onSubmit}
          isLoading={isSubmitting}
          disabled={isNextDisabled || isSubmitting}
        >
          <Send className="w-4 h-4 mr-2" />
          Get My Quote
        </Button>
      ) : (
        <Button
          type="button"
          variant="primary"
          onClick={onNext}
          disabled={isNextDisabled}
        >
          Continue
          <ChevronRight className="w-4 h-4 ml-1.5" />
        </Button>
      )}
    </div>
  );
}
