import{r as i,c as a,h as t}from"./p-52e3bb32.js";import{T as s}from"./p-46cbbcb5.js";import{_ as g}from"./p-08cf2c0e.js";const r=class{constructor(t){i(this,t),this.afOnClick=a(this,"afOnClick",7),this.afText=void 0,this.afNoIcon=!1,this.afAriaLabel=void 0,this.afSize=s.SMALL,this.afBreakWords=!1}clickHandler(i){i.stopPropagation(),this.afOnClick.emit(i)}get ariaLabel(){return this.afAriaLabel?this.afAriaLabel:this.afNoIcon?this.afText:g.removeItem(this.afText)}render(){return t("digi-button",{key:"8ec218f2ec9c75252bc0dd30a8e1c2b875c38f07",onAfOnClick:i=>this.clickHandler(i),"af-variation":"secondary","af-size":this.afSize,class:"digi-tag","af-aria-label":this.ariaLabel},this.afText,!this.afNoIcon&&t("digi-icon-x",{key:"882a55acb0f3cc2e52a25d0969faf360858b3cea",slot:"icon-secondary"}))}};r.style=".sc-digi-tag-h{--digi--tag--display:inline-block;--digi--tag--margin-bottom:var(--digi--gutter--smaller)}.sc-digi-tag-h .digi-tag.sc-digi-tag{display:var(--digi--tag--display);margin-bottom:var(--digi--tag--margin-bottom)}.sc-digi-tag-h .digi-tag__text.sc-digi-tag{display:inline-block;max-width:100%;white-space:normal}.sc-digi-tag-h .digi-tag__text--break.sc-digi-tag{overflow-wrap:anywhere;word-break:break-word;hyphens:auto}";export{r as digi_tag}