/*!
 * KoliBri - The accessible HTML-Standard
 */
import{h as o}from"./index-C_yiBYg2.js";import{c as e}from"./clsx-eK3rPvPS.js";const s=({disabled:s,index:n,ref:i,selected:t,onClick:r,onMouseOver:l,onFocus:u,onKeyDown:a,option:c,searchTerm:d})=>o("li",{id:`option-${n}`,key:`-${n}`,ref:i,"data-index":n,tabIndex:-1,role:"option","aria-selected":t?"true":void 0,"aria-disabled":s?"true":void 0,onClick:r,onMouseOver:l,onFocus:u,class:e("kol-custom-suggestions-option",{"kol-custom-suggestions-option--disabled":s}),onKeyDown:a},((e,s)=>{if(!(null==s?void 0:s.trim()))return e;const n=new RegExp(`(${s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})`,"gi");return e.split(n).map((e,s)=>n.test(e)?o("mark",{key:s},e):e)})(String(c),d||"")),n=({blockSuggestionMouseOver:s,onKeyDown:n,style:i},t)=>o("ul",{role:"listbox",style:i,class:e("kol-custom-suggestions-options-group",{"kol-custom-suggestions-options-group--cursor-hidden":s}),onKeyDown:n},t);export{n as C,s as a};