import * as i0 from '@angular/core';
import { Directive, Input } from '@angular/core';

class FlagBaseComponent {
    set name(value) {
        this.onNameChanged(value);
    }
    constructor(elementRef, renderer) {
        this.elementRef = elementRef;
        this.renderer = renderer;
    }
    onNameChanged(value) {
        this.renderer.removeClass(this.elementRef.nativeElement, `is-flag-${this.flagName}`);
        this.flagName = value ? value.toLowerCase() : null;
        if (this.flagName) {
            this.renderer.addClass(this.elementRef.nativeElement, 'is-flag-' + this.flagName);
        }
    }
    static { this.ɵfac = function FlagBaseComponent_Factory(t) { return new (t || FlagBaseComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2)); }; }
    static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: FlagBaseComponent, inputs: { name: "name" } }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FlagBaseComponent, [{
        type: Directive
    }], () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], { name: [{
            type: Input
        }] }); })();

/**
 * Generated bundle index. Do not edit.
 */

export { FlagBaseComponent };
//# sourceMappingURL=ironsource-fusion-ui-components-flag-common-base.mjs.map
