import { formatDate, formatPrice } from '@/lib/utils';

interface OrderHeaderProps {
  id: number;
  createdAt: string;
  total: number;
  itemsCount: number;
}

export function OrderHeader({ id, createdAt, total, itemsCount }: OrderHeaderProps) {
  return (
    <div className="px-6 py-4 border-b border-gray-200 bg-gray-50">
      <div className="flex justify-between items-center">
        <div>
          <h2 className="text-xl font-semibold text-gray-900">Заказ №{id}</h2>
          <p className="text-sm text-gray-500">
            от {formatDate(createdAt)}
          </p>
        </div>
        <div className="text-right">
          <div className="text-xl font-bold text-gray-900">
            {formatPrice(total)}
          </div>
          <span className="text-sm text-gray-500">
            {itemsCount} {itemsCount === 1 ? 'товар' : 
              itemsCount > 1 && itemsCount < 5 ? 'товара' : 'товаров'}
          </span>
        </div>
      </div>
    </div>
  );
} 