import React, { useState } from 'react'; import styled from '@emotion/styled'; import CheckIcon from '@mui/icons-material/Check'; import DoNotDisturbIcon from '@mui/icons-material/DoNotDisturb'; import KeyboardArrowLeftIcon from '@mui/icons-material/KeyboardArrowLeft'; import KeyboardArrowRightIcon from '@mui/icons-material/KeyboardArrowRight'; const CenterButton = styled('div')` display: flex; justify-content: center; align-items: center; width: 30px; height: 30px; border: 1px solid black; border-radius: 5px; margin: 5px; cursor: ${({ buttonEnabled }) => (buttonEnabled ? 'pointer' : 'not-allowed')}; transition: background-color 0.3s ease, color 0.3s ease; opacity: ${({ buttonEnabled }) => (buttonEnabled ? 1 : 0.5)}; ${({ color, buttonEnabled }) => buttonEnabled && color && ` &:hover { background-color: ${color}; color: white; } `} `; export const TransferBox = ({ fields, leftGroup, rightGroup }) => { const { id, exclusionList, oldListLabel, newListLabel } = fields; const [itemSelected, setItemSelected] = useState({}); const [containsSelection, setContainsSelection] = useState([]); return (