/*!
 * KoliBri - The accessible HTML-Standard
 */
import{_ as l}from"./tslib.es6-CxX45GIN.js";import{h as e,F as a}from"./index-C_yiBYg2.js";import{c as s}from"./clsx-eK3rPvPS.js";import{K as n}from"./Icon-FTWc_xI9.js";import"./common-Dd0zJQbD.js";import{s as t}from"./reuse-CX4AQDkS.js";import{m as o}from"./markdown-BSkXjaSn.js";import{i as r,K as i}from"./InternalUnderlinedBadgeText-BeTCgMOl.js";import{i as c}from"./isObject-DvSELytj.js";const d=a=>{const{class:l,style:o,label:t,icon:r}=a;return e(n,{class:s("icon",l),style:o,label:t||"",icons:r})},b=({label:a,hideLabel:l,allowMarkdown:n,badgeText:t})=>{if(l||!r(a))return null;const c="kol-span__label";return n?e("span",{class:s(c,"md"),innerHTML:o(a)}):e("span",{class:s(c)},t?e(i,{label:a,badgeText:t}):a)},m=({hideLabel:s,label:l,badgeText:n,allowMarkdown:o},i)=>{const c=!t(l);return e(a,null,c&&e(b,{label:l,hideLabel:s,badgeText:n,allowMarkdown:o}),e("span",{"aria-hidden":c?"true":void 0,class:"kol-span__label",hidden:c},i),r(n)&&n.length>0&&e("kbd",{class:"badge-text-hint","aria-hidden":"true"},n))},p=(a,n)=>{const{class:o,label:t,hideLabel:i=!1,badgeText:b,allowMarkdown:p,icons:g}=a,j=l(a,["class","label","hideLabel","badgeText","allowMarkdown","icons"]);let h=null,k=null,u=null,x=null;return c(g)?(h=g.top,k=g.left,u=g.right,x=g.bottom):r(g)&&(k={icon:g}),e("span",Object.assign({class:s("kol-span",{"kol-span--hide-label":i},o)},j),c(h)&&e(d,Object.assign({class:"top"},h)),e("span",{class:"kol-span__container"},c(k)&&e(d,Object.assign({class:"left"},k)),e(m,{label:t,hideLabel:i,allowMarkdown:p,badgeText:b},n),c(u)&&e(d,Object.assign({class:"right"},u))),c(x)&&e(d,Object.assign({class:"bottom"},x)))};export{p as K};