import { LabeledInput } from '@/components/ra-inputs/LabeledInput';
import { RadioButtonGroupInput as RaRadioButtonGroupInput, RadioButtonGroupInputProps } from 'react-admin';
import { styled } from '@mui/material/styles';

const StyledRadioButtonGroupInput = styled(RaRadioButtonGroupInput, { slot: 'root' })(() => ({
  marginTop: '0 !important',
  '& .MuiFormControlLabel-root': {
    marginLeft: -8 // Mantis overrides
  }
}));
function RadioButtonGroupInput(props: RadioButtonGroupInputProps): JSX.Element {
  return (
    // @ts-ignore
    <LabeledInput {...props}>
      {/* @ts-ignore */}
      <StyledRadioButtonGroupInput />
    </LabeledInput>
  );
}

export { RadioButtonGroupInput };
export type { RadioButtonGroupInputProps };
