import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
import { Chip } from '@mui/material';
import type { ChipOwnProps } from '@mui/material';

type Props = {
  color?: string;
  backgroundColor?: string;
} & ChipOwnProps;

// @ts-ignore
export default function Livemode({ color = '#bb5504', backgroundColor = '#ffde92', sx }: Props) {
  const { t } = useLocaleContext();
  return (
    <Chip
      label={t('common.livemode')}
      size="small"
      color="warning"
      sx={{
        ml: 2,
        height: '18px',
        lineHeight: '18px',
        textTransform: 'uppercase',
        fontSize: '0.7rem',
        fontWeight: 'bold',
        borderRadius: '4px',
        backgroundColor,
        color,
        ...sx,
      }}
    />
  );
}
