System.register(["@angular/core","@angular/material/core","@angular/cdk/a11y","@angular/cdk/coercion","@angular/platform-browser/animations"],function(e){"use strict";var t,i,n,a,s,r,o;return{setters:[function(e){t=e,e.Directive,e.Optional,e.Inject,e.Input,e.NgModule},function(e){i=e.mixinDisabled,n=e.MatCommonModule},function(e){a=e,s=e.A11yModule},function(e){r=e.coerceBooleanProperty},function(e){o=e.ANIMATION_MODULE_TYPE}],execute:function(){let d=0;const c=i(class{}),l="mat-badge-content";class m extends c{constructor(e,t,i,n,a){super(),this._ngZone=e,this._elementRef=t,this._ariaDescriber=i,this._renderer=n,this._animationMode=a,this._color="primary",this._overlap=!0,this.position="above after",this.size="medium",this._id=d++,this._isInitialized=!1}get color(){return this._color}set color(e){this._setColor(e),this._color=e}get overlap(){return this._overlap}set overlap(e){this._overlap=r(e)}get content(){return this._content}set content(e){this._updateRenderedContent(e)}get description(){return this._description}set description(e){this._updateHostAriaDescription(e)}get hidden(){return this._hidden}set hidden(e){this._hidden=r(e)}isAbove(){return-1===this.position.indexOf("below")}isAfter(){return-1===this.position.indexOf("before")}getBadgeElement(){return this._badgeElement}ngOnInit(){this._clearExistingBadges(),this.content&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement(),this._updateRenderedContent(this.content)),this._isInitialized=!0}ngOnDestroy(){this._renderer.destroyNode&&this._renderer.destroyNode(this._badgeElement),this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description)}_createBadgeElement(){const e=this._renderer.createElement("span"),t="mat-badge-active";return e.setAttribute("id",`mat-badge-content-${this._id}`),e.setAttribute("aria-hidden","true"),e.classList.add(l),"NoopAnimations"===this._animationMode&&e.classList.add("_mat-animation-noopable"),this._elementRef.nativeElement.appendChild(e),"function"==typeof requestAnimationFrame&&"NoopAnimations"!==this._animationMode?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{e.classList.add(t)})}):e.classList.add(t),e}_updateRenderedContent(e){const t=`${e??""}`.trim();this._isInitialized&&t&&!this._badgeElement&&(this._badgeElement=this._createBadgeElement()),this._badgeElement&&(this._badgeElement.textContent=t),this._content=t}_updateHostAriaDescription(e){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this.description),e&&this._ariaDescriber.describe(this._elementRef.nativeElement,e),this._description=e}_setColor(e){const t=this._elementRef.nativeElement.classList;t.remove(`mat-badge-${this._color}`),e&&t.add(`mat-badge-${e}`)}_clearExistingBadges(){const e=this._elementRef.nativeElement.querySelectorAll(`:scope > .${l}`);for(const t of Array.from(e))t!==this._badgeElement&&t.remove()}}e("MatBadge",m),m.\u0275fac=function(e){return new(e||m)(t.\u0275\u0275directiveInject(t.NgZone),t.\u0275\u0275directiveInject(t.ElementRef),t.\u0275\u0275directiveInject(a.AriaDescriber),t.\u0275\u0275directiveInject(t.Renderer2),t.\u0275\u0275directiveInject(o,8))},m.\u0275dir=t.\u0275\u0275defineDirective({type:m,selectors:[["","matBadge",""]],hostAttrs:[1,"mat-badge"],hostVars:20,hostBindings:function(e,i){2&e&&t.\u0275\u0275classProp("mat-badge-overlap",i.overlap)("mat-badge-above",i.isAbove())("mat-badge-below",!i.isAbove())("mat-badge-before",!i.isAfter())("mat-badge-after",i.isAfter())("mat-badge-small","small"===i.size)("mat-badge-medium","medium"===i.size)("mat-badge-large","large"===i.size)("mat-badge-hidden",i.hidden||!i.content)("mat-badge-disabled",i.disabled)},inputs:{disabled:["matBadgeDisabled","disabled"],color:["matBadgeColor","color"],overlap:["matBadgeOverlap","overlap"],position:["matBadgePosition","position"],content:["matBadge","content"],description:["matBadgeDescription","description"],size:["matBadgeSize","size"],hidden:["matBadgeHidden","hidden"]},features:[t.\u0275\u0275InheritDefinitionFeature]});class h{}e("MatBadgeModule",h),h.\u0275fac=function(e){return new(e||h)},h.\u0275mod=t.\u0275\u0275defineNgModule({type:h}),h.\u0275inj=t.\u0275\u0275defineInjector({imports:[s,n,n]})}}});
