/*!
 * KoliBri - The accessible HTML-Standard
 */
"use strict";var tslib_es6=require("./tslib.es6-7DbU_BSw.js"),index=require("./index-D0FxsaCe.js"),clsx=require("./clsx-CkZlkaek.js"),Icon=require("./Icon-CqQh6zkI.js");require("./common-Cd2qH809.js");var reuse=require("./reuse-Cs36Ddzu.js"),markdown=require("./markdown-1dxeA2q6.js"),InternalUnderlinedBadgeText=require("./InternalUnderlinedBadgeText-Bv5-Alwn.js"),isObject=require("./isObject-DMA85Fq4.js");const IconHelper=e=>{const{class:l,style:n,label:s,icon:a}=e;return index.h(Icon.KolIconFc,{class:clsx.clsx("icon",l),style:n,label:s||"",icons:a})},LabelHelper=({label:e,hideLabel:l,allowMarkdown:n,badgeText:s})=>{if(l||!InternalUnderlinedBadgeText.isString(e))return null;const a="kol-span__label";return n?index.h("span",{class:clsx.clsx(a,"md"),innerHTML:markdown.md(e)}):s?index.h("span",{class:clsx.clsx(a)},index.h(InternalUnderlinedBadgeText.KolInternalUnderlinedBadgeTextFc,{label:e,badgeText:s})):index.h("span",{class:clsx.clsx(a)},e)},KolSpanCoreHelperFc=({hideLabel:e,label:l,badgeText:n,allowMarkdown:s},a)=>{const i=!reuse.showExpertSlot(l);return index.h(index.Fragment,null,i&&index.h(LabelHelper,{label:l,hideLabel:e,badgeText:n,allowMarkdown:s}),index.h("span",{"aria-hidden":i?"true":void 0,class:"kol-span__label",hidden:i},a),InternalUnderlinedBadgeText.isString(n)&&n.length>0&&index.h("kbd",{class:"badge-text-hint","aria-hidden":"true"},n))},KolSpanFc=(e,l)=>{const{class:n,label:s,hideLabel:a=!1,badgeText:i,allowMarkdown:r,icons:t}=e,d=tslib_es6.__rest(e,["class","label","hideLabel","badgeText","allowMarkdown","icons"]);let c=null,o=null,b=null,x=null;return isObject.isObject(t)?(c=t.top,o=t.left,b=t.right,x=t.bottom):InternalUnderlinedBadgeText.isString(t)&&(o={icon:t}),index.h("span",Object.assign({class:clsx.clsx("kol-span",{"kol-span--hide-label":a},n)},d),isObject.isObject(c)&&index.h(IconHelper,Object.assign({class:"top"},c)),index.h("span",{class:"kol-span__container"},isObject.isObject(o)&&index.h(IconHelper,Object.assign({class:"left"},o)),index.h(KolSpanCoreHelperFc,{label:s,hideLabel:a,allowMarkdown:r,badgeText:i},l),isObject.isObject(b)&&index.h(IconHelper,Object.assign({class:"right"},b))),isObject.isObject(x)&&index.h(IconHelper,Object.assign({class:"bottom"},x)))};exports.KolSpanFc=KolSpanFc;