import { Button } from './ui'
import { t } from '@/lib/i18n'

type CategoryFilter = 'science-fiction' | 'scientific-research' | 'all' | null

interface CategoryTabsProps {
  selectedCategory: CategoryFilter
  onCategoryChange: (category: CategoryFilter) => void
}

export function CategoryTabs({ selectedCategory, onCategoryChange }: CategoryTabsProps): React.ReactElement {
  return (
    <div className="mb-6">
      <div className="border-b border-neon-cyan/30">
        <nav className="-mb-px flex space-x-8">
          <Button
            type="button"
            variant="ghost"
            onClick={() => onCategoryChange('science-fiction')}
            className={`py-4 px-1 border-b-2 font-medium text-sm transition-colors rounded-none ${
              selectedCategory === 'science-fiction'
                ? 'border-neon-cyan text-neon-cyan'
                : 'border-transparent text-cyber-accent/70 hover:text-neon-cyan hover:border-neon-cyan/50'
            }`}
          >
            {t('category.science-fiction')}
          </Button>
          <Button
            type="button"
            variant="ghost"
            onClick={() => onCategoryChange('scientific-research')}
            className={`py-4 px-1 border-b-2 font-medium text-sm transition-colors rounded-none ${
              selectedCategory === 'scientific-research'
                ? 'border-neon-cyan text-neon-cyan'
                : 'border-transparent text-cyber-accent/70 hover:text-neon-cyan hover:border-neon-cyan/50'
            }`}
          >
            {t('category.scientific-research')}
          </Button>
        </nav>
      </div>
    </div>
  )
}
