import "core-js/modules/es6.object.assign";
import "core-js/modules/web.dom.iterable";
import "core-js/modules/es6.array.iterator";
import "core-js/modules/es6.object.keys";

function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }

import React from 'react';
import PropTypes from 'prop-types';
import { Icon, Input } from "./..";
/**
 * @category controls
 * @component search-input
 * @variations collab-ui-react
*/

var SearchInput = function SearchInput(props) {
  var type = props.type,
      otherProps = _objectWithoutPropertiesLoose(props, ["type"]);

  return React.createElement(Input, _extends({
    className: 'cui-search-input' + ("" + (type === 'pill' ? ' cui-search-input--pill' : ''))
  }, otherProps), React.createElement(Icon, {
    className: "cui-search-input__icon",
    name: "" + (type === 'pill' ? 'search_16' : 'search_20')
  }));
};

SearchInput.propTypes = {
  /** @prop Style of search input normal or pill | 'normal' */
  type: PropTypes.oneOf(['normal', 'pill'])
};
SearchInput.defaultProps = {
  type: 'normal'
};
SearchInput.displayName = 'SearchInput';
export default SearchInput;
/**
* @name Normal Search Input
* @description Search inputs allow the user to input search text.
*
* @category controls
* @component search-input
* @section default
*
* @js
import { SearchInput } from '@collab-ui/react';

export default class DefaultSearchInput extends React.PureComponent {
  render() {
    return (
      <div className='row'>
        <SearchInput
          name='defaultSearchInput'
          htmlId='defaultSearchInput'
          inputSize='small-5'
        />
      </div>
    );
  }
}

**/

/**
* @name Pill Search Input
* @description To use the pill style search input, set <code>type='pill'</code>.
*
* @category controls
* @component search-input
* @section pill
*
* @js
import { SearchInput } from '@collab-ui/react';

export default class PillSearchInput extends React.PureComponent {
  render() {
    return (
      <div className='row'>
        <SearchInput
          name='pillSearchInput'
          htmlId='pillSearchInput'
          type='pill'
          inputSize='small-5'
        />
      </div>
    );
  }
}

**/