import _startCase from "lodash/startCase";
import _get from "lodash/get";
export default {
  name: "pb-render-page-element-style-padding",
  type: "pb-render-page-element-style",
  renderStyle: function renderStyle(_ref) {
    var element = _ref.element,
        style = _ref.style;

    var _get2 = _get(element, "data.settings", {}),
        padding = _get2.padding;

    if (!padding) {
      return style;
    }

    var adv = padding.advanced;
    var _padding$desktop = padding.desktop,
        desktop = _padding$desktop === void 0 ? {} : _padding$desktop;
    ["top", "right", "bottom", "left"].forEach(function (side) {
      var Side = _startCase(side);

      style["padding".concat(Side)] = ((adv ? desktop[side] : desktop.all) || 0) + "px";
    });
    return style;
  }
};
//# sourceMappingURL=index.js.map