"use strict";

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

exports.__esModule = true;
exports.TextWithLinkFilter = void 0;

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

var _react = _interopRequireDefault(require("react"));

var _Common = require("../../../../../Common");

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

var _link = _interopRequireDefault(require("next/link"));

var _templateObject, _templateObject2, _templateObject3;

var TextWithLinkFilter = function TextWithLinkFilter(_ref) {
  var data = _ref.data;
  return /*#__PURE__*/_react["default"].createElement(_Common.ScrollView, {
    maxHeight: "none",
    maxWidth: "100%",
    overflowDirection: "x"
  }, /*#__PURE__*/_react["default"].createElement(Container, null, data.items.map(function (filter) {
    var name = filter.name,
        url = filter.url;
    return /*#__PURE__*/_react["default"].createElement(Wrapper, {
      key: "Filter__" + name + "-" + url
    }, /*#__PURE__*/_react["default"].createElement(_link["default"], {
      prefetch: false,
      href: url,
      passHref: true
    }, /*#__PURE__*/_react["default"].createElement(Text, null, name)));
  })));
};

exports.TextWithLinkFilter = TextWithLinkFilter;

var Container = _styledComponents["default"].div.attrs({
  className: 'd-flex d-lg-block mb-2'
})(_templateObject || (_templateObject = (0, _taggedTemplateLiteralLoose2["default"])([""])));

var Wrapper = _styledComponents["default"].div.attrs({
  className: 'px-2'
})(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteralLoose2["default"])(["\n  &:first-child {\n    padding-left: 1.6rem !important;\n  }\n\n  &:last-child {\n    padding-right: 1.6rem !important;\n  }\n"])));

var Text = (0, _styledComponents["default"])(_Common.Typography).attrs({
  as: 'a',
  variant: 5,
  color: 'primary',
  className: 'd-block px-lg-0'
})(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteralLoose2["default"])(["\n  white-space: nowrap;\n  line-height: 3rem;\n  font-weight: 500;\n  @media (max-width: ", ") {\n    background: ", ";\n    padding: 0 0.5rem;\n    border-radius: 0.2rem;\n  }\n  @media (min-width: ", ") {\n    background-color: transparent;\n    border: 0;\n  }\n"])), function (_ref2) {
  var theme = _ref2.theme;
  return theme.breakpoints.lg.min;
}, function (_ref3) {
  var theme = _ref3.theme;
  return theme.palette.whiteSmoke;
}, function (_ref4) {
  var theme = _ref4.theme;
  return theme.breakpoints.lg.min;
});
//# sourceMappingURL=index.js.map