"use strict";

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

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

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

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

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

var _lib = require("@sentecacommerce-theme/lib");

var _router = require("next/router");

var _Components = require("./Components");

var _templateObject, _templateObject2;

var BlogPage = function BlogPage(_ref) {
  var labels = _ref.labels;
  var router = (0, _router.useRouter)();
  var isIndexPage = router.pathname === '/blog';
  var isProductPage = router.pathname === '/blog/[slug]';
  return /*#__PURE__*/_react["default"].createElement(_lib.LocalLabelsProvider, {
    labels: labels
  }, /*#__PURE__*/_react["default"].createElement(MainContainer, null, /*#__PURE__*/_react["default"].createElement(BlogListing, null, isIndexPage && /*#__PURE__*/_react["default"].createElement(_Components.BlogListing, null), isProductPage && /*#__PURE__*/_react["default"].createElement(_Components.BlogPost, null))));
};

exports.BlogPage = BlogPage;

var MainContainer = _styledComponents["default"].div.attrs({
  className: 'container mt-5'
})(_templateObject || (_templateObject = (0, _taggedTemplateLiteralLoose2["default"])([""])));

var BlogListing = _styledComponents["default"].div.attrs({
  className: ''
})(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteralLoose2["default"])([""])));
//# sourceMappingURL=blogPage.component.js.map