import s from"@markdoc/markdoc";import{slugger as l}from"../../utils/slugger.js";import{getInnerText as a}from"../helpers/get-inner-text.js";const d={children:["inline"],attributes:{id:{type:String},level:{type:Number,required:!0,default:1},__idx:{type:Number}},transform(e,r){const t=e.transformAttributes(r),i=e.transformChildren(r),n=typeof t.id=="string"?t.id:l.slug(a(i),{replaceDots:!0,replaceSlashes:!0});return new s.Tag("Heading",{...t,id:n,level:e.attributes.level},i)}};export{d as heading};
