/** biome-ignore-all lint/a11y/noStaticElementInteractions: need it */
import IconCreate from '@mui/icons-material/Create';
import { Box, Chip, FormHelperText, Grid, Typography } from '@mui/material';
import type { Ref } from 'react';
import type { CxArg } from 'tss-react';
import { makeStyles } from 'tss-react/mui';
import useHover from './useHover';
const maxChips = 5;
const useStyles = makeStyles()((theme) => ({
chip: {
backgroundColor: theme.palette.action.disabledBackground,
marginTop: theme.spacing(1),
width: '95%'
},
container: {
borderRadius: theme.spacing(0.5),
cursor: 'pointer',
outline: 'none',
padding: theme.spacing(1),
width: '100%'
},
emptyChip: {
borderColor: theme.palette.divider,
borderStyle: 'dashed',
borderWidth: 2,
padding: theme.spacing(1),
textAlign: 'center'
},
hidden: {
visibility: 'hidden'
},
hovered: {
backgroundColor: theme.palette.action.hover
},
icon: {
color: theme.palette.action.active
},
labelChip: {
color: theme.palette.text.secondary
},
text: {
color: theme.palette.text.primary
}
}));
interface EntryProps {
gridWidth?: 'auto' | number;
label: string;
size?: 'small' | 'medium';
}
const EntryChip = ({
label,
size = 'small',
gridWidth = 6
}: EntryProps): JSX.Element => {
const { classes } = useStyles();
return (