import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
import _createClass from "@babel/runtime/helpers/createClass";
import _inherits from "@babel/runtime/helpers/inherits";
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
import _defineProperty from "@babel/runtime/helpers/defineProperty";

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

/* eslint-disable jsx-a11y/label-has-for */

/* eslint-disable jsx-a11y/label-has-associated-control */
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import classNames from 'classnames';

var SearchSkeleton = /*#__PURE__*/function (_Component) {
  _inherits(SearchSkeleton, _Component);

  var _super = _createSuper(SearchSkeleton);

  function SearchSkeleton() {
    _classCallCheck(this, SearchSkeleton);

    return _super.apply(this, arguments);
  }

  _createClass(SearchSkeleton, [{
    key: "render",
    value: function render() {
      var _this$props = this.props,
          small = _this$props.small,
          id = _this$props.id;
      var searchClasses = classNames({
        'wfp--skeleton': true,
        'wfp--search--lg': !small,
        'wfp--search--sm': small
      });
      return /*#__PURE__*/React.createElement("div", {
        className: searchClasses,
        role: "search"
      }, /*#__PURE__*/React.createElement("label", {
        htmlFor: id,
        className: "wfp--label"
      }), /*#__PURE__*/React.createElement("div", {
        className: "wfp--search-input"
      }));
    }
  }]);

  return SearchSkeleton;
}(Component);

_defineProperty(SearchSkeleton, "propTypes", {
  small: PropTypes.bool
});

_defineProperty(SearchSkeleton, "defaultProps", {
  small: false
});

export { SearchSkeleton as default };