import { t } from '@/lib/i18n'

interface ArticleFormButtonsProps {
  loading: boolean
  onCancel?: () => void
}

export function ArticleFormButtons({ loading, onCancel }: ArticleFormButtonsProps): JSX.Element {
  return (
    <div className="flex gap-3 pt-4">
      <button
        type="submit"
        disabled={loading}
        className="flex-1 px-4 py-2 bg-neon-cyan/20 hover:bg-neon-cyan/30 text-neon-cyan rounded-lg font-medium transition-all border border-neon-cyan/50 hover:shadow-glow-cyan disabled:opacity-50 disabled:cursor-not-allowed"
      >
        {loading ? t('publish.publishing') : t('publish.button')}
      </button>
      {onCancel && (
        <button
          type="button"
          onClick={onCancel}
          className="px-4 py-2 bg-cyber-dark hover:bg-cyber-dark/80 text-cyber-accent rounded-lg font-medium transition-colors border border-cyber-accent/30 hover:border-neon-cyan/50"
        >
          {t('common.back')}
        </button>
      )}
    </div>
  )
}
