"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.paddingLeftXl = exports.paddingLeftLg = exports.paddingLeftMd = exports.paddingLeftSm = exports.widthXl = exports.widthLg = exports.widthMd = exports.widthSm = void 0;

var _gridItem = require("./grid-item.constants");

var widthSm = function widthSm(_ref) {
  var sm = _ref.sm,
      _ref$offsetSm = _ref.offsetSm,
      offsetSm = _ref$offsetSm === void 0 ? 0 : _ref$offsetSm;
  return sm != null && sm !== 'hide' ? "".concat((sm + offsetSm) * 100 / _gridItem.numColsSm, "%") : undefined;
};

exports.widthSm = widthSm;

var widthMd = function widthMd(_ref2) {
  var sm = _ref2.sm,
      md = _ref2.md,
      _ref2$offsetMd = _ref2.offsetMd,
      offsetMd = _ref2$offsetMd === void 0 ? 0 : _ref2$offsetMd;
  var colCount = md || sm;
  return colCount != null && colCount !== 'hide' ? "".concat((colCount + offsetMd) * 100 / _gridItem.numColsMd, "%") : undefined;
};

exports.widthMd = widthMd;

var widthLg = function widthLg(_ref3) {
  var sm = _ref3.sm,
      md = _ref3.md,
      lg = _ref3.lg,
      _ref3$offsetLg = _ref3.offsetLg,
      offsetLg = _ref3$offsetLg === void 0 ? 0 : _ref3$offsetLg;
  var colCount = lg || md || sm;
  return colCount != null && colCount !== 'hide' ? "".concat((colCount + offsetLg) * 100 / _gridItem.numColsLg, "%") : undefined;
};

exports.widthLg = widthLg;

var widthXl = function widthXl(_ref4) {
  var sm = _ref4.sm,
      md = _ref4.md,
      lg = _ref4.lg,
      xl = _ref4.xl,
      _ref4$offsetXl = _ref4.offsetXl,
      offsetXl = _ref4$offsetXl === void 0 ? 0 : _ref4$offsetXl;
  var colCount = xl || lg || md || sm;
  return colCount != null && colCount !== 'hide' ? "".concat((colCount + offsetXl) * 100 / _gridItem.numColsXl, "%") : undefined;
};

exports.widthXl = widthXl;

var paddingLeftSm = function paddingLeftSm(_ref5) {
  var _ref5$offsetSm = _ref5.offsetSm,
      offsetSm = _ref5$offsetSm === void 0 ? 0 : _ref5$offsetSm;
  return "".concat(offsetSm * 100 / _gridItem.numColsSm, "%");
};

exports.paddingLeftSm = paddingLeftSm;

var paddingLeftMd = function paddingLeftMd(_ref6) {
  var _ref6$offsetMd = _ref6.offsetMd,
      offsetMd = _ref6$offsetMd === void 0 ? 0 : _ref6$offsetMd;
  return "".concat(offsetMd * 100 / _gridItem.numColsMd, "%");
};

exports.paddingLeftMd = paddingLeftMd;

var paddingLeftLg = function paddingLeftLg(_ref7) {
  var _ref7$offsetLg = _ref7.offsetLg,
      offsetLg = _ref7$offsetLg === void 0 ? 0 : _ref7$offsetLg;
  return "".concat(offsetLg * 100 / _gridItem.numColsLg, "%");
};

exports.paddingLeftLg = paddingLeftLg;

var paddingLeftXl = function paddingLeftXl(_ref8) {
  var _ref8$offsetXl = _ref8.offsetXl,
      offsetXl = _ref8$offsetXl === void 0 ? 0 : _ref8$offsetXl;
  return "".concat(offsetXl * 100 / _gridItem.numColsLg, "%");
};

exports.paddingLeftXl = paddingLeftXl;