"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../util/check-bullet.cjs.js"),f=require("../util/check-bullet-other.cjs.js"),g=require("../util/check-bullet-ordered.cjs.js"),x=require("../util/check-rule.cjs.js");function S(l,u,e,h){const d=e.enter("list"),k=e.bulletCurrent;let c=l.ordered?g.checkBulletOrdered(e):b.checkBullet(e);const o=l.ordered?c==="."?")":".":f.checkBulletOther(e);let t=u&&e.bulletLastUsed?c===e.bulletLastUsed:!1;if(!l.ordered){const i=l.children?l.children[0]:void 0;if((c==="*"||c==="-")&&i&&(!i.children||!i.children[0])&&e.stack[e.stack.length-1]==="list"&&e.stack[e.stack.length-2]==="listItem"&&e.stack[e.stack.length-3]==="list"&&e.stack[e.stack.length-4]==="listItem"&&e.indexStack[e.indexStack.length-1]===0&&e.indexStack[e.indexStack.length-2]===0&&e.indexStack[e.indexStack.length-3]===0&&(t=!0),x.checkRule(e)===c&&i){let n=-1;for(;++n<l.children.length;){const r=l.children[n];if(r&&r.type==="listItem"&&r.children&&r.children[0]&&r.children[0].type==="thematicBreak"){t=!0;break}}}}t&&(c=o),e.bulletCurrent=c;const s=e.containerFlow(l,h);return e.bulletLastUsed=c,e.bulletCurrent=k,d(),s}exports.list=S;
//# sourceMappingURL=list.cjs.js.map
