import{fm as n,ao as s,ba as x,L as b,at as f}from"./app-k0jcl5PQ.js";const T="_tagList_ihahv_1",C="_badgeBase_ihahv_5",y="_disabled_ihahv_8",B="_partialTag_ihahv_16",p="_removeBadge_ihahv_19",L="_removeBadgeText_ihahv_23",N="_close_ihahv_26",o={tagList:T,badgeBase:C,disabled:y,partialTag:B,removeBadge:p,removeBadgeText:L,close:N},w="shared.tags",k=b.encloseNamespace(w);function $(e,l){switch(e){case n.Pedagogy:case n.Skill:return"pedagogy-tag text-white";case n.Hidden:return"hidden-tag fw-normal";case n.Normal:return l?"":"bg-gray-100 fw-normal";default:return""}}function R(e){var u,_;const{tag:l,appLink:i,onClick:r,disabled:g,tagClass:v="tag"}=e,t=l.name.toLowerCase(),m=(u=l.tagType)==null?void 0:u.toLowerCase(),c=m===n.Normal&&e.themeColours&&!!((_=e.themeColours)!=null&&_.secondary);let a=`${o.badgeBase} rounded-pill py-1 px-2 my-1 me-1 ${v} ${$(m,c)}`,d="text-truncate text-nowrap";c&&(a+=" text-white"),(i||r)&&!g&&(a+=" cursor-pointer"),g&&(a+=" "+o.disabled),e.onRemove&&(a+=" "+o.removeBadge,d+=` ${o.removeBadgeText} d-inline-flex align-items-center lh-1`),i||(a+=" d-inline-block");const h=c?{backgroundColor:e.themeColours.secondary}:{};return i?s.jsx(x,{onClick:r,appLink:i,className:a,title:t,style:h,children:s.jsx("span",{className:d,children:t})}):s.jsx("button",{onClick:r,className:a,title:t,style:h,"aria-label":`${k("ariaFilter")} ${t}`,children:s.jsxs("span",{className:d,children:[t,e.onRemove&&s.jsx(f,{onClick:e.onRemove,className:`${o.close} btn-close font-size-normal`,role:"button","aria-label":"Close"})]})})}export{R as T,o as s};
//# sourceMappingURL=BxQFOoIR.chunk.js.map
