import{r as i,c as t,h as a}from"./p-52e3bb32.js";import{T as s}from"./p-46cbbcb5.js";import{_ as g}from"./p-08cf2c0e.js";const r=class{constructor(a){i(this,a),this.afOnClick=t(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 a("digi-button",{key:"55cce70f4de26f0a2b8650cb8ffb683b62d39157",onAfOnClick:i=>this.clickHandler(i),"af-variation":"secondary","af-size":this.afSize,class:"digi-tag","af-aria-label":this.ariaLabel},this.afText,!this.afNoIcon&&a("digi-icon-x",{key:"8c4b1ff744288216ea42bd6c66826ea6fdcc7dce",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}