import{d as v,G as b,o as i,n as _,w as h,b as n,t as r,B as u,z as T,N as S,a as m,I as y,c as s,A as g,F as k,l as C,e as N,b5 as $,j as B,_ as L}from"./index-207e8178.js";import{V as A}from"./VMenu-a5999549.js";const V=["id"],R=["id"],U=["aria-label","aria-describedby"],z={role:"tooltip"},w={key:0},F=["id"],P=["href"],D=v({__name:"InfoToggle",props:{alt:String,tooltipTitle:String,tooltipText:[String,Array],tooltipURL:String,tooltipURLtext:String,index:Number,externalIconFilter:{type:String,default:null},asChip:{type:Boolean,default:!1},labelId:{type:String,default:null},tooltipColor:{type:String,default:"cta_blue"}},setup(t){const l=t,I=b(()=>l.tooltipURLtext??"Lees meer"),x=e=>e&&e.length>0?`${e}-`:"",p=e=>e&&e.length>0?`-${e}`:"",c=b(()=>{let e="";if(l.labelId){const d="item-";e=l.labelId.startsWith(d)?l.labelId.replace(d,""):l.labelId;const o=e.split("-",2);o.length>1&&!isNaN(parseInt(o[0],10))&&(e=e.slice(o[0].length+1)),e=e.replace("-0","");const a="tooltip";e.endsWith(a)&&(e=e.replace(a,""))}return e}),f=e=>Array.isArray(e)?e:[e];return(e,d)=>(i(),_(A,{"content-class":"info-toggle-content elevation-4","scroll-strategy":"none",location:"bottom center",origin:"top center","open-on-hover":!0,offset:[15,15],"max-width":"370px",eager:""},{activator:h(({props:o})=>[n("span",{id:`tooltip-description${p(c.value)}`,class:"visually-hidden"},"meer informatie over "+r(c.value),9,V),n("span",{id:`${x(t.labelId)}info-toggle-activator`,class:u({chip:t.asChip})},[T(e.$slots,"default",{},void 0,!0),n("button",S(o,{"aria-label":t.alt,"aria-describedby":`tooltip-description${p(c.value)}`}),[m(y,{icon:"info",middle:"",class:u("text-"+t.tooltipColor),size:30},null,8,["class"])],16,U)],10,R)]),default:h(()=>[n("div",z,[t.tooltipTitle?(i(),s("h3",w,r(t.tooltipTitle),1)):g("",!0),t.tooltipText?(i(!0),s(k,{key:1},C(f(t.tooltipText),(o,a)=>(i(),s("p",{key:o,id:`${t.labelId}-info-toggle-tooltip-text-${a}`,class:u(a!==f(t.tooltipText).length-1?"mb-2":"")},r(o),11,F))),128)):g("",!0),t.tooltipURL?(i(),s("a",{key:2,class:"button item-link bg-cta_blue",target:"_blank",rel:"noopener",href:N($)(t.tooltipURL)},[B(r(I.value)+" ",1),m(y,{icon:"external",middle:""})],8,P)):g("",!0)])]),_:3}))}});const E=L(D,[["__scopeId","data-v-1963fdae"]]);export{E as I};