"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");

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 }; }

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(", ") format('embedded-opentype'),url(", ") format('woff2'),url(", ") format('woff'),url(", ") format('truetype');}@font-face{font-family:'FuturaPT';src:url(", ");src:url(", ") format('embedded-opentype'),url(", ") format('woff2'),url(", ") format('woff'),url(", ") format('truetype');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');
}, require('../core/typography/fonts/FuturaPT-Book.eot'), require('../core/typography/fonts/FuturaPT-Book.eot?#iefix'), require('../core/typography/fonts/FuturaPT-Book.woff2'), require('../core/typography/fonts/FuturaPT-Book.woff'), require('../core/typography/fonts/FuturaPT-Book.ttf'), require('../core/typography/fonts/FuturaPT-Heavy.eot'), require('../core/typography/fonts/FuturaPT-Heavy.eot?#iefix'), require('../core/typography/fonts/FuturaPT-Heavy.woff2'), require('../core/typography/fonts/FuturaPT-Heavy.woff'), require('../core/typography/fonts/FuturaPT-Heavy.ttf'), require('../core/typography/fonts/OpenSans-Regular.ttf'), require('../core/typography/fonts/OpenSans-Bold.ttf'));
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;