import React from 'react';
import { BadgeProps, BadgeVariant } from '../../interfaces';
import { Wrapper } from './styles';

const Badge = ({
  title,
  setSelected,
  isSelected,
  variant = BadgeVariant.FILLED,
}: BadgeProps) => (
  <Wrapper
    type="button"
    variant={variant}
    isSelected={isSelected}
    onClick={setSelected}
  >
    {title}
  </Wrapper>
);

export default Badge;
