import{LitElement as e,html as c,css as t}from"lit";import{classMap as o}from"lit/directives/class-map.js";import{ifDefined as n}from"lit/directives/if-defined.js";import{skeletonStyles as r}from"./styles/skeleton.js";import"./cc-icon.js";class i extends e{static get properties(){return{circle:{type:Boolean},icon:{type:Object},iconA11yName:{type:String,attribute:"icon-a11y-name"},intent:{type:String},skeleton:{type:Boolean},weight:{type:String}}}constructor(){super(),this.circle=!1,this.icon=null,this.iconA11yName=null,this.intent="neutral",this.skeleton=!1,this.weight="dimmed"}render(){const e={dimmed:null==this.weight||"dimmed"===this.weight,strong:"strong"===this.weight,outlined:"outlined"===this.weight,neutral:null==this.intent||"neutral"===this.intent,info:"info"===this.intent,success:"success"===this.intent,warning:"warning"===this.intent,danger:"danger"===this.intent,skeleton:this.skeleton,circle:this.circle};return c`<span class="${o(e)} cc-badge">${null!=this.icon?c`<cc-icon .icon=${this.icon} a11y-name=${n(this.iconA11yName)}></cc-icon>`:""} <span><slot></slot></span></span>`}static get styles(){return[r,t`:host{display:inline-block}.cc-badge{align-items:center;border-radius:1em;display:flex;font-size:.8em;gap:.3em;justify-content:var(--cc-badge-justify-content,center);padding:.2em .8em}.skeleton{background-color:#bbb!important;border:.06em solid #bbb!important;color:transparent!important}.skeleton.outlined{border:.06em solid #777!important}.skeleton cc-icon{visibility:hidden!important}.circle{border-radius:50%;font-size:1em;height:1.5em;justify-content:center;min-height:unset;padding:0;width:1.5em}.dimmed{background-color:var(--accent-color,#ccc);border:.06em solid var(--accent-color,#ccc)}.strong{background-color:var(--accent-color,#777);border:.06em solid var(--accent-color,#777);color:var(--cc-color-text-inverted,#fff)}.outlined{background-color:transparent;border:.06em solid var(--accent-color,#777);color:var(--accent-color,#777)}.info{--accent-color:var(--cc-color-bg-primary)}.info.dimmed{--accent-color:var(--cc-color-bg-primary-weak)}.success{--accent-color:var(--cc-color-bg-success)}.success.dimmed{--accent-color:var(--cc-color-bg-success-weak)}.danger{--accent-color:var(--cc-color-bg-danger)}.danger.dimmed{--accent-color:var(--cc-color-bg-danger-weak)}.warning{--accent-color:var(--cc-color-bg-warning)}.warning.dimmed{--accent-color:var(--cc-color-bg-warning-weak)}.neutral{--accent-color:var(--cc-color-bg-strong)}.neutral.dimmed{--accent-color:var(--cc-color-bg-neutral-alt)}img{height:1em;width:1em}`]}}window.customElements.define("cc-badge",i);export{i as CcBadge};
//# sourceMappingURL=cc-badge.js.map
