import React__default from 'react';
import PropTypes from 'prop-types';
import { Search } from '@carbon/react';
import { white } from '@carbon/colors';

var propTypes = {
  /** i18n strings */
  i18n: PropTypes.shape({
    iconDescription: PropTypes.string,
    placeHolderText: PropTypes.string,
    closeButtonText: PropTypes.string
  }),
  searchValue: PropTypes.string,
  onChange: PropTypes.func,
  width: PropTypes.string,
  testId: PropTypes.string
};
var defaultProps = {
  i18n: {
    iconDescription: 'Search',
    placeHolderText: '',
    closeButtonText: 'Clear search input'
  },
  searchValue: '',
  onChange: function onChange() {},
  width: '304px',
  testId: 'tile-gallery-search-input'
};
var TileGallerySearch = function TileGallerySearch(_ref) {
  var i18n = _ref.i18n,
    searchValue = _ref.searchValue,
    _onChange = _ref.onChange,
    width = _ref.width,
    testId = _ref.testId;
  return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(Search, {
    style: {
      background: white,
      width: width
    },
    value: searchValue,
    labelText: i18n.iconDescription,
    placeholder: i18n.placeHolderText,
    onChange: function onChange(event) {
      return _onChange(event);
    },
    closeButtonLabelText: i18n.closeButtonText,
    id: "gallery-search",
    "data-testid": testId
  }));
};
TileGallerySearch.propTypes = propTypes;
TileGallerySearch.defaultProps = defaultProps;
TileGallerySearch.__docgenInfo = {
  "description": "",
  "methods": [],
  "displayName": "TileGallerySearch",
  "props": {
    "i18n": {
      "defaultValue": {
        "value": "{\n  iconDescription: 'Search',\n  placeHolderText: '',\n  closeButtonText: 'Clear search input',\n}",
        "computed": false
      },
      "description": "i18n strings",
      "type": {
        "name": "shape",
        "value": {
          "iconDescription": {
            "name": "string",
            "required": false
          },
          "placeHolderText": {
            "name": "string",
            "required": false
          },
          "closeButtonText": {
            "name": "string",
            "required": false
          }
        }
      },
      "required": false
    },
    "searchValue": {
      "defaultValue": {
        "value": "''",
        "computed": false
      },
      "description": "",
      "type": {
        "name": "string"
      },
      "required": false
    },
    "onChange": {
      "defaultValue": {
        "value": "() => {}",
        "computed": false
      },
      "description": "",
      "type": {
        "name": "func"
      },
      "required": false
    },
    "width": {
      "defaultValue": {
        "value": "'304px'",
        "computed": false
      },
      "description": "",
      "type": {
        "name": "string"
      },
      "required": false
    },
    "testId": {
      "defaultValue": {
        "value": "'tile-gallery-search-input'",
        "computed": false
      },
      "description": "",
      "type": {
        "name": "string"
      },
      "required": false
    }
  }
};
var TileGallerySearch$1 = TileGallerySearch;

export { TileGallerySearch$1 as default };
