"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _css2 = require("@emotion/css");

var _css3 = _interopRequireDefault(_css2);

var _core = require("@emotion/core");

var _propTypes = require("prop-types");

var _propTypes2 = _interopRequireDefault(_propTypes);

var _presets = require("../../utils/presets");

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

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

var baseStyles = {
  listStyle: "none",
  margin: "0",
  padding: "0",
  position: "relative",
  display: "flex",
  justifyContent: "center"
};

var Tabs = function Tabs(_ref) {
  var children = _ref.children,
      _ref$variant = _ref.variant,
      variant = _ref$variant === void 0 ? "DEFAULT" : _ref$variant;
  var tabStyles = {
    DEFAULT: {},
    NUMBERED: {
      textAlign: "center",
      paddingTop: _presets.spaces["2xl"],
      ":after": _defineProperty({
        borderBottom: "1px solid ".concat(_presets.colors.standardLine),
        bottom: "0",
        content: "\"\"",
        left: "0",
        position: "absolute",
        width: "calc(100% + (2 * ".concat(_presets.dimensions.pagePadding.mobile, "))"),
        marginLeft: "-".concat(_presets.dimensions.pagePadding.mobile),
        zIndex: "1"
      }, "@media (min-width: ".concat(_presets.breakpoints.tablet, "px)"), {
        width: "calc(100% + (2 * ".concat(_presets.dimensions.pagePadding.tablet, "))"),
        marginLeft: "-".concat(_presets.dimensions.pagePadding.tablet)
      })
    }
  };
  return (0, _core.jsx)("ul", {
    css:
    /*#__PURE__*/
    (0, _css3["default"])(_objectSpread({}, baseStyles, {}, tabStyles[variant]), "label:Tabs;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL1RhYnMvVGFicy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1Q00iLCJmaWxlIjoiLi4vLi4vLi4vc3JjL2NvbXBvbmVudHMvVGFicy9UYWJzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBqc3ggfSBmcm9tIFwiQGVtb3Rpb24vY29yZVwiXG5pbXBvcnQgUHJvcFR5cGVzIGZyb20gXCJwcm9wLXR5cGVzXCJcblxuaW1wb3J0IHsgY29sb3JzLCBkaW1lbnNpb25zLCBicmVha3BvaW50cywgc3BhY2VzIH0gZnJvbSBcIi4uLy4uL3V0aWxzL3ByZXNldHNcIlxuXG5jb25zdCBiYXNlU3R5bGVzID0ge1xuICBsaXN0U3R5bGU6IGBub25lYCxcbiAgbWFyZ2luOiBgMGAsXG4gIHBhZGRpbmc6IGAwYCxcbiAgcG9zaXRpb246IGByZWxhdGl2ZWAsXG4gIGRpc3BsYXk6IGBmbGV4YCxcbiAganVzdGlmeUNvbnRlbnQ6IGBjZW50ZXJgLFxufVxuXG5jb25zdCBUYWJzID0gKHsgY2hpbGRyZW4sIHZhcmlhbnQgPSBgREVGQVVMVGAgfSkgPT4ge1xuICBjb25zdCB0YWJTdHlsZXMgPSB7XG4gICAgREVGQVVMVDoge30sXG4gICAgTlVNQkVSRUQ6IHtcbiAgICAgIHRleHRBbGlnbjogYGNlb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1CRVJFRGBdKSxcbn1cblxuZXhwb3J0IGRlZmF1bHQgVGFic1xuIl19 */"))
  }, children);
};

Tabs.propTypes = {
  children: _propTypes2["default"].node,
  variant: _propTypes2["default"].oneOf(["DEFAULT", "NUMBERED"])
};
exports["default"] = Tabs;