"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var margin_exports = {};
__export(margin_exports, {
  marginPropertyDataToStyle: () => marginPropertyDataToStyle
});
module.exports = __toCommonJS(margin_exports);
var import_length = require("./length");
function marginPropertyDataToStyle(data, defaultValue = {}) {
  const marginTop = data.marginTop ?? defaultValue.marginTop;
  const marginRight = data.marginRight ?? defaultValue.marginRight;
  const marginBottom = data.marginBottom ?? defaultValue.marginBottom;
  const marginLeft = data.marginLeft ?? defaultValue.marginLeft;
  const style = {};
  if (marginTop != null)
    style.marginTop = (0, import_length.lengthDataToString)(marginTop);
  if (marginRight != null)
    style.marginRight = (0, import_length.lengthDataToString)(marginRight);
  if (marginBottom != null)
    style.marginBottom = (0, import_length.lengthDataToString)(marginBottom);
  if (marginLeft != null)
    style.marginLeft = (0, import_length.lengthDataToString)(marginLeft);
  return style;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  marginPropertyDataToStyle
});
//# sourceMappingURL=margin.js.map