{"ast":null,"code":"import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nimport React from \"react\";\nimport cn from 'classnames';\nimport styles from './SearchBox.module.scss';\n\nvar MagnifierSVG = function MagnifierSVG(props) {\n  return /*#__PURE__*/_jsx(\"svg\", _objectSpread(_objectSpread({}, props), {}, {\n    children: /*#__PURE__*/_jsx(\"path\", {\n      d: \"M12.5 11.45h-.79l-.28-.27A6.471 6.471 0 0 0 13 6.95a6.5 6.5 0 1 0-6.5 6.5c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99 1.49-1.49-4.99-5zm-6 0c-2.49 0-4.5-2.01-4.5-4.5s2.01-4.5 4.5-4.5S11 4.46 11 6.95s-2.01 4.5-4.5 4.5z\",\n      fill: \"#000\"\n    })\n  }));\n};\n\nMagnifierSVG.defaultProps = {\n  width: \"18\",\n  height: \"18\",\n  viewBox: \"0 0 18 18\",\n  fill: \"none\",\n  xmlns: \"http://www.w3.org/2000/svg\"\n};\n\nvar SearchBox = function SearchBox(_ref) {\n  var className = _ref.className,\n      onSearch = _ref.onSearch,\n      placeholder = _ref.placeholder;\n\n  var onChange = function onChange(event) {\n    onSearch(event.target.value.toLowerCase().trim());\n  };\n\n  return /*#__PURE__*/_jsxs(\"div\", {\n    className: cn(styles.searchBox, className),\n    children: [/*#__PURE__*/_jsx(MagnifierSVG, {\n      className: cn(styles.magnifier)\n    }), /*#__PURE__*/_jsx(\"input\", {\n      type: \"text\",\n      onChange: onChange,\n      placeholder: placeholder\n    })]\n  });\n};\n\nexport default SearchBox;","map":null,"metadata":{},"sourceType":"module"}