"use strict";

function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

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

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

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

var _span = require("../core/typography/span");

var _branding = require("../mixins/branding");

var _FuturaPTBook = _interopRequireDefault(require("../core/typography/fonts/FuturaPT-Book.eot"));

var _FuturaPTBook2 = _interopRequireDefault(require("../core/typography/fonts/FuturaPT-Book.woff"));

var _FuturaPTBook3 = _interopRequireDefault(require("../core/typography/fonts/FuturaPT-Book.woff2"));

var _FuturaPTBook4 = _interopRequireDefault(require("../core/typography/fonts/FuturaPT-Book.ttf"));

var _FuturaPTHeavy = _interopRequireDefault(require("../core/typography/fonts/FuturaPT-Heavy.eot"));

var _FuturaPTHeavy2 = _interopRequireDefault(require("../core/typography/fonts/FuturaPT-Heavy.woff"));

var _FuturaPTHeavy3 = _interopRequireDefault(require("../core/typography/fonts/FuturaPT-Heavy.woff2"));

var _FuturaPTHeavy4 = _interopRequireDefault(require("../core/typography/fonts/FuturaPT-Heavy.ttf"));

var _FuturaPTBookOblique = _interopRequireDefault(require("../core/typography/fonts/FuturaPT-Book-Oblique.eot"));

var _FuturaPTBookOblique2 = _interopRequireDefault(require("../core/typography/fonts/FuturaPT-Book-Oblique.woff"));

var _FuturaPTBookOblique3 = _interopRequireDefault(require("../core/typography/fonts/FuturaPT-Book-Oblique.woff2"));

var _FuturaPTBookOblique4 = _interopRequireDefault(require("../core/typography/fonts/FuturaPT-Book-Oblique.ttf"));

var _FuturaPTHeavyOblique = _interopRequireDefault(require("../core/typography/fonts/FuturaPT-Heavy-Oblique.eot"));

var _FuturaPTHeavyOblique2 = _interopRequireDefault(require("../core/typography/fonts/FuturaPT-Heavy-Oblique.woff"));

var _FuturaPTHeavyOblique3 = _interopRequireDefault(require("../core/typography/fonts/FuturaPT-Heavy-Oblique.woff2"));

var _FuturaPTHeavyOblique4 = _interopRequireDefault(require("../core/typography/fonts/FuturaPT-Heavy-Oblique.ttf"));

var _OpenSansRegular = _interopRequireDefault(require("../core/typography/fonts/OpenSans-Regular.ttf"));

var _OpenSansBold = _interopRequireDefault(require("../core/typography/fonts/OpenSans-Bold.ttf"));

function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

// Provides a clean CSS slate for everything inside this provider
// so that a polluted CSS host environment and/or browser styles don't
// affect the rendering of patchwork's scoped component styles.
var Resets = (0, _styledComponents["default"])(_span.Span).withConfig({
  displayName: "Resets",
  componentId: "sc-1ydydby-0"
})(["display:block;margin:0;padding:0;position:relative;color:", ";*{box-sizing:border-box;&:before,&:after{box-sizing:border-box;}html input[type='button'],input[type='reset'],input[type='submit']{-webkit-appearance:button;cursor:pointer;}input[type='checkbox'],input[type='radio']{box-sizing:border-box;padding:0;}input[type='search']{box-sizing:border-box;-webkit-appearance:none;border-radius:3px;}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}input[type='number']{-moz-appearance:textfield;}input[type='search']::-webkit-search-cancel-button,input[type='search']::-webkit-search-decoration{-webkit-appearance:none;}-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;@font-face{font-family:'FuturaPT';src:url('", "');src:url('", "?#iefix') format('embedded-opentype'),url('", "') format('woff2'),url('", "') format('woff'),url('", "') format('truetype');}@font-face{font-family:'FuturaPT';src:url('", "');src:url('", "?#iefix') format('embedded-opentype'),url('", "') format('woff2'),url('", "') format('woff'),url('", "') format('truetype');font-weight:700;}@font-face{font-family:'FuturaPT';src:url('", "');src:url('", "?#iefix') format('embedded-opentype'),url('", "') format('woff2'),url('", "') format('woff'),url('", "') format('truetype');font-style:italic;}@font-face{font-family:'FuturaPT';src:url('", "');src:url('", "?#iefix') format('embedded-opentype'),url('", "') format('woff2'),url('", "') format('woff'),url('", "') format('truetype');font-style:italic;font-weight:700;}@font-face{font-family:'OpenSans';font-style:normal;font-weight:normal;src:url('", "') format('truetype');}@font-face{font-family:'OpenSans';font-style:normal;font-weight:bold;src:url('", "') format('truetype');}}"], function (_ref) {
  var theme = _ref.theme;
  return (0, _branding.getPaletteColor)(theme.defaultTextColor || 'greyscale-black');
}, _FuturaPTBook["default"], _FuturaPTBook["default"], _FuturaPTBook3["default"], _FuturaPTBook2["default"], _FuturaPTBook4["default"], _FuturaPTHeavy["default"], _FuturaPTHeavy["default"], _FuturaPTHeavy3["default"], _FuturaPTHeavy2["default"], _FuturaPTHeavy4["default"], _FuturaPTBookOblique["default"], _FuturaPTBookOblique["default"], _FuturaPTBookOblique3["default"], _FuturaPTBookOblique2["default"], _FuturaPTBookOblique4["default"], _FuturaPTHeavyOblique["default"], _FuturaPTHeavyOblique["default"], _FuturaPTHeavyOblique3["default"], _FuturaPTHeavyOblique2["default"], _FuturaPTHeavyOblique4["default"], _OpenSansRegular["default"], _OpenSansBold["default"]);
exports.Resets = Resets;
Resets.displayName = 'PatchworkThemeReset';

var PatchworkThemeProvider = function PatchworkThemeProvider(_ref2) {
  var theme = _ref2.theme,
      children = _ref2.children;
  return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
    theme: theme
  }, /*#__PURE__*/_react["default"].createElement(Resets, {
    face: "sans"
  }, children));
};

exports.PatchworkThemeProvider = PatchworkThemeProvider;