import React from 'react'
import cx from 'classnames'
import { isEmpty } from 'ramda'
import MTIcon from './mt-icon'

function MTSelectSelectionMultiple (props) {
  const {
    label,
    onRemove,
    className,
    ...otherProps
  } = props

  return (
    <span { ...otherProps } className={ cx('mt-select-selection-multiple', className) }>
      <span className="mt-select-selection-multiple__label">
        <strong>{ isEmpty(label) ? '\xa0' : label }</strong>
      </span>
      <span className="mt-select-selection-multiple__remove" onClick={ onRemove }>
        <MTIcon type="remove" />
      </span>
    </span>
  )
}

export default MTSelectSelectionMultiple
