import PropTypes from 'prop-types';
import getColor from "../../../../utils/colors/getColor.js";
import StateLabel from '../../StateLabel';
const defaultBoundaryProps = {
  fill: 'white',
  stroke: getColor('warmgray-30')
};
const defaultLabelProps = {
  fill: getColor('warmgray-100')
};
const Special = function Special(props) {
  const {
    dimensions,
    label,
    specialClassName,
    labelClassName,
    boundaryProps,
    labelProps
  } = props;
  const {
    x,
    y,
    width,
    height
  } = dimensions;
  const cx = x + width / 2;
  const cy = y + height / 2;
  return <g>
      <rect className={specialClassName} x={x} y={y} width={width} height={height} {...defaultBoundaryProps} {...boundaryProps} />
      <StateLabel center={[cx, cy]} label={label} className={labelClassName} {...defaultLabelProps} {...labelProps} />
    </g>;
};
Special.defaultProps = {
  specialClassName: undefined,
  labelClassName: undefined,
  boundaryProps: {},
  labelProps: {}
};
Special.propTypes = {
  dimensions: PropTypes.shape({
    x: PropTypes.number,
    y: PropTypes.number,
    width: PropTypes.number,
    height: PropTypes.number
  }).isRequired,
  label: PropTypes.string.isRequired,
  specialClassName: PropTypes.string,
  labelClassName: PropTypes.string,
  boundaryProps: PropTypes.shape({}),
  labelProps: PropTypes.shape({})
};
export default Special;