import{h}from"@stencil/core";export class ScTag{constructor(){this.type="default",this.size="medium",this.pill=!1,this.clearable=!1,this.ariaLabel=void 0}handleClearClick(){this.scClear.emit(this)}render(){const e=this.clearable?"button":"span";return h(e,{key:"f8dd6924f8d7db87dc9ebdc15e23f6095f311626",part:"base",onClick:()=>this.handleClearClick(),class:{tag:!0,"tag--primary":"primary"===this.type,"tag--success":"success"===this.type,"tag--info":"info"===this.type,"tag--warning":"warning"===this.type,"tag--danger":"danger"===this.type,"tag--default":"default"===this.type,"tag--small":"small"===this.size,"tag--medium":"medium"===this.size,"tag--large":"large"===this.size,"tag--pill":this.pill,"tag--clearable":this.clearable},"aria-label":this.ariaLabel},h("span",{key:"fb725b324c57a6f51410b5d6c1a35d2533433cba",class:"tag__prefix",part:"prefix"},h("slot",{key:"14127d973d4cfb83a798b2c31c7435f5c5eaced8",name:"prefix"})),h("span",{key:"715435af337fa1615a0fb0b51c57de1013020533",part:"content",class:"tag__content"},h("slot",{key:"7956911def174643834f04f71af6feb6ebe3255b"})),!!this.clearable&&h("svg",{key:"39548436aa286139b16bb315d7b4102084024239",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-x",viewBox:"0 0 16 16"},h("path",{key:"208d1674ec8a3e3a501d000ab501c0d84c340279",d:"M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"})),h("span",{key:"14fb8adb20a9e74491f8b845a0603ea7f8cecf42",class:"tag__suffix",part:"suffix"},h("slot",{key:"0a5157697eac0d0a135b6b20c66502fd9a78a6e7",name:"suffix"})))}static get is(){return"sc-tag"}static get encapsulation(){return"shadow"}static get originalStyleUrls(){return{$:["sc-tag.scss"]}}static get styleUrls(){return{$:["sc-tag.css"]}}static get properties(){return{type:{type:"string",mutable:!1,complexType:{original:"'primary' | 'success' | 'info' | 'warning' | 'danger' | 'default'",resolved:'"danger" | "default" | "info" | "primary" | "success" | "warning"',references:{}},required:!1,optional:!1,docs:{tags:[],text:"The tag's type."},attribute:"type",reflect:!0,defaultValue:"'default'"},size:{type:"string",mutable:!1,complexType:{original:"'small' | 'medium' | 'large'",resolved:'"large" | "medium" | "small"',references:{}},required:!1,optional:!1,docs:{tags:[],text:"The tag's size."},attribute:"size",reflect:!0,defaultValue:"'medium'"},pill:{type:"boolean",mutable:!1,complexType:{original:"boolean",resolved:"boolean",references:{}},required:!1,optional:!1,docs:{tags:[],text:"Draws a pill-style tag with rounded edges."},attribute:"pill",reflect:!0,defaultValue:"false"},clearable:{type:"boolean",mutable:!1,complexType:{original:"boolean",resolved:"boolean",references:{}},required:!1,optional:!1,docs:{tags:[],text:"Makes the tag clearable."},attribute:"clearable",reflect:!1,defaultValue:"false"},ariaLabel:{type:"string",mutable:!1,complexType:{original:"string",resolved:"string",references:{}},required:!1,optional:!1,docs:{tags:[],text:"Aria label"},attribute:"aria-label",reflect:!1}}}static get events(){return[{method:"scClear",name:"scClear",bubbles:!0,cancelable:!0,composed:!0,docs:{tags:[],text:""},complexType:{original:"ScTag",resolved:"ScTag",references:{ScTag:{location:"global",id:"global::ScTag"}}}}]}}