import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
var _excluded = ["children", "className", "color", "size", "onClick"];
import React from 'react';
import PropTypes from 'prop-types';
import Box, { pickBoxProps } from '../box';
import cx from 'classnames';
import theme from './theme.css';
var SIZES = {
  small: 3,
  medium: 4,
  large: 5
};
/** @type {React.ComponentType<any>} */

var Island = function Island(props) {
  var children = props.children,
      className = props.className,
      color = props.color,
      size = props.size,
      onClick = props.onClick,
      others = _objectWithoutProperties(props, _excluded);

  var classNames = cx(theme[color], className);
  var boxProps = pickBoxProps(others);
  return /*#__PURE__*/React.createElement(Box, _extends({
    "data-teamleader-ui": "island",
    backgroundColor: color === 'white' ? 'neutral' : color,
    backgroundTint: color === 'neutral' ? 'light' : 'lightest',
    borderRadius: "rounded",
    borderColor: color === 'white' ? 'neutral' : color,
    borderTint: "normal",
    borderBottomWidth: 1,
    borderLeftWidth: 1,
    borderRightWidth: 1,
    borderTopWidth: 1,
    className: classNames,
    padding: SIZES[size],
    onClick: onClick
  }, boxProps), children);
};

Island.defaultProps = {
  color: 'white',
  size: 'medium'
};
export default Island;