var breakpoints = {
  XL: 960,
  // TV
  L: 769,
  // Portal 8 cols
  M: 560,
  // Portal 6 cols
  S: 0 // Mobile
};
var columns = {
  XL: 12,
  L: 8,
  M: 6,
  S: 4
};
var margins = {
  XL: 4,
  L: 3.5,
  M: 3.5,
  S: 1
};
var gutters = {
  XL: 1,
  L: 1,
  M: 1,
  S: 0.5
};
var sizes = /*#__PURE__*/Object.keys(breakpoints);

/**
 * Обертка над css-медиазапросами с заранее определенными брейкпоинтами.
 */
// TODO: https://github.com/salute-developers/plasma/issues/906
var mediaQuery = function mediaQuery(breakpoint) {
  var deviceScale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
  var index = sizes.indexOf(breakpoint);
  var nextBreakpoint = sizes[index - 1];
  var min = breakpoints[breakpoint] > 0 ? breakpoints[breakpoint] * deviceScale : null;
  var max = breakpoints[nextBreakpoint] ? (breakpoints[nextBreakpoint] - 1) * deviceScale : null;
  if (min === null && max !== null) {
    return function (content) {
      return "\n                @media (max-width: ".concat(max, "px) {\n                    ").concat(content, "\n                }\n            ");
    };
  }
  if (min !== null && max !== null) {
    return function (content) {
      return "\n                @media screen and (min-width: ".concat(min, "px) and (max-width: ").concat(max, "px) {\n                    ").concat(content, "\n                }\n            ");
    };
  }
  return function (content) {
    return "\n            @media (min-width: ".concat(min, "px) {\n                ").concat(content, "\n            }\n        ");
  };
};

export { breakpoints, columns, gutters, margins, mediaQuery, sizes };
