import React from 'react'

import { Button } from '@/components/ui/button'

import type { ActionButtonsProps } from '../types'

// Компонент кнопок действий для поставщика
export const ActionButtons = React.memo(function ActionButtons({ 
  supplyId, 
  onSupplyAction, 
}: ActionButtonsProps) {
  return (
    <div className="flex space-x-2">
      <Button
        type="button"
        size="sm"
        className="glass-button bg-gradient-to-r from-green-500 to-emerald-500 text-white text-xs font-medium h-8 px-3 hover:scale-105 transition-all duration-200"
        onClick={(e) => {
          e.stopPropagation()
          onSupplyAction?.(supplyId, 'approve')
        }}
      >
        Одобрить
      </Button>
      <Button
        type="button"
        size="sm"
        className="bg-gradient-to-r from-red-600 to-red-500 hover:from-red-700 hover:to-red-600 text-white text-xs font-medium h-8 px-3 hover:scale-105 transition-all duration-200 backdrop-blur border border-red-500/30"
        onClick={(e) => {
          e.stopPropagation()
          onSupplyAction?.(supplyId, 'reject')
        }}
      >
        Отклонить
      </Button>
    </div>
  )
})