"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 get_start_margin_exports = {};
__export(get_start_margin_exports, {
  getStartMargin: () => getStartMargin
});
module.exports = __toCommonJS(get_start_margin_exports);
var import_wix_rich_content_common = require("./../../../../../wix-rich-content-common/index.js");
function getStartMargin(parentNode, visibleIndentation) {
  if (!parentNode) {
    return "1.5em";
  }
  const parenNodeDataName = `${parentNode?.type?.slice(0, -5).toLowerCase()}ListData`;
  const nodeOffset = parentNode[parenNodeDataName]?.offset || 0;
  const offset = visibleIndentation > import_wix_rich_content_common.MAX_LIST_VISIBLE_INDENTATION ? nodeOffset - (visibleIndentation - import_wix_rich_content_common.MAX_LIST_VISIBLE_INDENTATION) : (0, import_wix_rich_content_common.normalizeOffset)(nodeOffset);
  return parentNode ? `${(0, import_wix_rich_content_common.normalizeOffset)(offset) * 2 + 1.5}em` : "";
}
//# sourceMappingURL=get-start-margin.js.map
