"use client"

import React from 'react'
import { Button } from '@/components/ui/button'
import { ShoppingCart } from 'lucide-react'

interface FloatingCartProps {
  itemCount: number
  totalAmount: number
  formatCurrency: (amount: number) => string
  onClick: () => void
  visible: boolean
}

export function FloatingCart({ 
  itemCount, 
  totalAmount, 
  formatCurrency, 
  onClick, 
  visible 
}: FloatingCartProps) {
  if (!visible || itemCount === 0) {
    return null
  }

  return (
    <div className="fixed bottom-6 right-6 z-50">
      <Button 
        size="lg"
        className="bg-gradient-to-r from-purple-500 to-pink-500 hover:from-purple-600 hover:to-pink-600 text-white shadow-2xl"
        onClick={onClick}
      >
        <ShoppingCart className="h-5 w-5 mr-2" />
        {itemCount} • {formatCurrency(totalAmount)}
      </Button>
    </div>
  )
} 