import MuiTab, { TabProps as MuiTabProps } from '@mui/material/Tab';
import React from 'react';
import createClasses from './styles';

export interface TabProps {
  variant?: 'primary' | 'secondary';
}

function Tab<C extends React.ElementType>({
  variant,
  ...rest
}: TabProps & MuiTabProps<C, { component?: C }>) {
  const classes = createClasses();
  return <MuiTab className={variant === 'secondary' ? classes.secondary : undefined} {...rest} />;
}

export default Tab;
