/* eslint-disable filenames/match-regex */
import { styled } from '@mui/material/styles';
import { SimpleFormIterator as RaSimpleFormIterator, SimpleFormIteratorProps } from 'react-admin';

// @ts-ignore
const StyledSimpleFormIterator = styled(RaSimpleFormIterator, { root: 'root' })(({ theme }) => ({
  '& .RaSimpleFormIterator-line': {
    paddingTop: theme.spacing(1),
    paddingBottom: theme.spacing(0.5)
  },
  '& .RaSimpleFormIterator-action': {
    display: 'flex',
    flexDirection: 'row',
    alignItems: 'center',
    mb: 1.5
  },
  '& section': {
    width: '100%',
    '& label': {
      position: 'relative',
      overflow: 'visible',
      transform: 'none',
      marginLeft: 0
    }
  }
}));

function SimpleFormIterator(props: SimpleFormIteratorProps): JSX.Element {
  return <StyledSimpleFormIterator {...props} />;
}
export { SimpleFormIterator };
export type { SimpleFormIteratorProps } from 'react-admin';
