import _taggedTemplateLiteralLoose from "@babel/runtime/helpers/taggedTemplateLiteralLoose";
import _extends from "@babel/runtime/helpers/extends";

var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;

import React from 'react';
import styled from 'styled-components';
import { Accordion, SocialMediaIcon, Copyright, SubFooterList, FooterImages } from './Components';
import { IconPhone } from '../Common/Icons';
export var Footer = (_ref) => {
  var {
    menu,
    social,
    copyright,
    subfooter,
    contacts,
    footerImages
  } = _ref;
  return /*#__PURE__*/React.createElement(Container, {
    className: "py-4 footer mt-md-5"
  }, /*#__PURE__*/React.createElement("div", {
    className: "container"
  }, /*#__PURE__*/React.createElement(Inner, null, (menu == null ? void 0 : menu.isEnabled) && /*#__PURE__*/React.createElement(AccordionContainer, null, menu.elements.map((data, index) => /*#__PURE__*/React.createElement(Accordion, {
    key: 'menu-' + index,
    data: data
  }))), (social == null ? void 0 : social.isEnabled) && /*#__PURE__*/React.createElement(SocialMenuContainer, null, /*#__PURE__*/React.createElement(SocialMenuListWrapper, null, social.elements.map(data => /*#__PURE__*/React.createElement(SocialMediaIcon, _extends({
    key: data.media
  }, data)))), (contacts == null ? void 0 : contacts.isEnabled) && /*#__PURE__*/React.createElement(ContactsWrapper, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, contacts == null ? void 0 : contacts.label), /*#__PURE__*/React.createElement(IconWrapper, null, /*#__PURE__*/React.createElement(IconPhone, null), /*#__PURE__*/React.createElement("div", {
    className: "ml-2"
  }, /*#__PURE__*/React.createElement("a", {
    href: 'tel:' + (contacts == null ? void 0 : contacts.phone)
  }, contacts == null ? void 0 : contacts.phone))))))), (footerImages == null ? void 0 : footerImages.isEnabled) && /*#__PURE__*/React.createElement(FooterImages, {
    elements: footerImages == null ? void 0 : footerImages.elements
  }), /*#__PURE__*/React.createElement(SubFooterContainer, {
    className: "mt-4 pb-3 mx-2 px-1"
  }, (copyright == null ? void 0 : copyright.isEnabled) && /*#__PURE__*/React.createElement(Copyright, null, copyright.content), (subfooter == null ? void 0 : subfooter.isEnabled) && /*#__PURE__*/React.createElement(SubFooterListContainer, null, /*#__PURE__*/React.createElement(SubFooterList, {
    data: subfooter.elements
  })))));
};
var Container = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n  display: block;\n\n  @media (min-width: ", ") {\n    min-height: 20rem;\n  }\n\n  width: 100%;\n  background: ", ";\n  color: ", ";\n"])), (_ref2) => {
  var {
    theme
  } = _ref2;
  return theme.breakpoints.md.min;
}, (_ref3) => {
  var {
    theme
  } = _ref3;
  return theme.palette.primary;
}, (_ref4) => {
  var {
    theme
  } = _ref4;
  return theme.palette.secondary;
});
var Inner = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n  display: flex;\n  justify-content: space-between;\n  flex-wrap: wrap;\n\n  @media (min-width: ", ") {\n    flex-wrap: nowrap;\n  }\n"])), (_ref5) => {
  var {
    theme
  } = _ref5;
  return theme.breakpoints.md.min;
});
var AccordionContainer = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n  display: none;\n  width: 100%;\n  display: inline-block;\n  vertical-align: top;\n\n  @media (min-width: ", ") {\n    width: 75%;\n  }\n"])), (_ref6) => {
  var {
    theme
  } = _ref6;
  return theme.breakpoints.md.min;
});
var SocialMenuContainer = styled.div.attrs({
  className: 'mt-3 mt-md-1 mx-2 px-1'
})(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n  display: inline-block;\n  vertical-align: top;\n  min-width: 22rem;\n  @media (min-width: ", ") {\n    width: 25%;\n    padding-left: 0;\n  }\n"])), (_ref7) => {
  var {
    theme
  } = _ref7;
  return theme.breakpoints.md.min;
});
var SocialMenuListWrapper = styled.ul(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["\n  list-style: none;\n  text-align: left;\n  display: flex;\n  margin: 0 -8px;\n\n  @media (min-width: ", ") {\n    justify-content: flex-end;\n  }\n"])), (_ref8) => {
  var {
    theme
  } = _ref8;
  return theme.breakpoints.md.min;
});
var SubFooterContainer = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteralLoose(["\n  color: ", ";\n\n  @media (min-width: ", ") {\n    border-top: 1px solid ", ";\n  }\n"])), (_ref9) => {
  var {
    theme
  } = _ref9;
  return theme.palette.hint;
}, (_ref10) => {
  var {
    theme
  } = _ref10;
  return theme.breakpoints.md.min;
}, (_ref11) => {
  var {
    theme
  } = _ref11;
  return theme.palette.footerLine;
});
var SubFooterListContainer = styled.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteralLoose(["\n  width: 100%;\n  display: inline-block;\n\n  @media (min-width: ", ") {\n    width: 50%;\n  }\n"])), (_ref12) => {
  var {
    theme
  } = _ref12;
  return theme.breakpoints.md.min;
});
var ContactsWrapper = styled.div.attrs({
  className: 'mt-3 d-flex'
})(_templateObject8 || (_templateObject8 = _taggedTemplateLiteralLoose(["\n  color: ", ";\n  @media (min-width: ", ") {\n    margin-right: 2.5rem;\n    justify-content: flex-end;\n  }\n"])), (_ref13) => {
  var {
    theme
  } = _ref13;
  return theme.palette.light;
}, (_ref14) => {
  var {
    theme
  } = _ref14;
  return theme.breakpoints.md.min;
});
var IconWrapper = styled.div.attrs({
  className: 'd-flex align-items-center'
})(_templateObject9 || (_templateObject9 = _taggedTemplateLiteralLoose([""])));
//# sourceMappingURL=footer.component.js.map