"use strict";

var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _propTypes = _interopRequireDefault(require("prop-types"));

var React = _interopRequireWildcard(require("react"));

var _styledComponents = _interopRequireDefault(require("styled-components"));

var _Icons = require("../../Atoms/Icons");

var _interpolation = require("../../Tools/interpolation");

var TogglerExpand =
/*#__PURE__*/
(0, _styledComponents.default)(_Icons.FasTimes).withConfig({
  componentId: "sc-1til0ak-0"
})(["\n  fill: ", ";\n  z-index: ", ";\n\n  &:hover {\n    fill: ", ";\n  }\n\n  @media (min-width: ", ") {\n    display: none;\n  }\n"], (0, _interpolation.theme)('navbarTogglerColor'), (0, _interpolation.theme)('navbarTogglerZIndex'), (0, _interpolation.theme)('navbarTogglerColor'), (0, _interpolation.screenSize)('sm'));
var TogglerCollapse =
/*#__PURE__*/
(0, _styledComponents.default)(_Icons.FasBars).withConfig({
  componentId: "sc-1til0ak-1"
})(["\n  fill: ", " !important;\n\n  &:hover {\n    fill: ", " !important;\n  }\n\n  @media (min-width: ", ") {\n    display: none;\n  }\n"], (0, _interpolation.theme)('navbarTogglerColor'), (0, _interpolation.theme)('navbarTogglerColor'), (0, _interpolation.screenSize)('sm'));

var NavbarToggler = function NavbarToggler(_ref) {
  var onToggle = _ref.onToggle,
      toggled = _ref.toggled;
  return toggled === true ? React.createElement(TogglerExpand, {
    onClick: onToggle,
    selectable: true,
    size: "20px"
  }) : React.createElement(TogglerCollapse, {
    onClick: onToggle,
    selectable: true,
    size: "25px"
  });
};

NavbarToggler.propTypes = process.env.NODE_ENV !== "production" ? {
  onToggle: _propTypes.default.func.isRequired,
  toggled: _propTypes.default.bool
} : {};
NavbarToggler.defaultProps = {
  toggled: false
};
var _default = NavbarToggler;
exports.default = _default;