/**
 * @fileoverview added by tsickle
 * Generated from: lib/tap-scanner/tap-scanner-common/ble-rssi-signal/ble-rssi-signal.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
import { Component, Input } from '@angular/core';
export class BleRssiSignalComponent {
    constructor() {
        this.bars = 0;
        this._colorMap = ['#E51E25', '#FEC212', '#FEC212', '#0FAF4B', '#0FAF4B'];
    }
    /**
     * @param {?} colors
     * @return {?}
     */
    set colors(colors) {
        this._colorMap = colors;
    }
    /**
     * @return {?}
     */
    ngOnInit() { }
    /**
     * @return {?}
     */
    get color() {
        /** @type {?} */
        let safeIndex = Math.max(0, Math.min(this.bars, this._colorMap.length));
        return this._colorMap[safeIndex];
    }
    ;
}
BleRssiSignalComponent.decorators = [
    { type: Component, args: [{
                selector: 'tap-ble-rssi-signal',
                template: "<div class=\"rssi-container\">\r\n  <svg version=\"1.1\" viewBox=\"0 0 512 512\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\r\n    class=\"chart\" aria-labelledby=\"title\" role=\"img\">\r\n    <svg x=\"6\" class=\"bar\" [attr.color]=\"color\">\r\n      <rect height=\"100\" x=\"10\" y=\"400\" width=\"80\" rx=\"30\" [attr.fill-opacity]=\"bars >= 1? 1:0\"></rect>\r\n    </svg>\r\n    <svg x=\"106\" class=\"bar\" [attr.color]=\"color\">\r\n      <rect height=\"200\" x=\"10\" y=\"300\" width=\"80\" rx=\"30\" [attr.fill-opacity]=\"bars >= 2? 1:0\"></rect>\r\n    </svg>\r\n    <svg x=\"206\" class=\"bar\" [attr.color]=\"color\">\r\n      <rect height=\"300\" x=\"10\" y=\"200\" width=\"80\" rx=\"30\" [attr.fill-opacity]=\"bars >= 3? 1:0\"></rect>\r\n    </svg>\r\n    <svg x=\"306\" class=\"bar\" [attr.color]=\"color\">\r\n      <rect height=\"400\" x=\"10\" y=\"100\" width=\"80\" rx=\"30\" [attr.fill-opacity]=\"bars >= 4? 1:0\"></rect>\r\n    </svg>\r\n    <svg x=\"406\" class=\"bar\" [attr.color]=\"color\">\r\n      <rect height=\"500\" x=\"10\" width=\"80\" rx=\"30\" [attr.fill-opacity]=\"bars >= 5? 1:0\"></rect>\r\n    </svg>\r\n  </svg>\r\n</div>",
                styles: [".rssi-container{display:inline-block;width:1em;height:1em;contain:strict}.bar rect{fill:currentColor;stroke:#000;stroke-width:3}"]
            }] }
];
/** @nocollapse */
BleRssiSignalComponent.ctorParameters = () => [];
BleRssiSignalComponent.propDecorators = {
    bars: [{ type: Input }],
    colors: [{ type: Input }]
};
if (false) {
    /**
     * @type {?}
     * @private
     */
    BleRssiSignalComponent.prototype._colorMap;
    /** @type {?} */
    BleRssiSignalComponent.prototype.bars;
    /* Skipping unhandled member: ;*/
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmxlLXJzc2ktc2lnbmFsLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0Bpb3RpemUvaW9uaWMvIiwic291cmNlcyI6WyJsaWIvdGFwLXNjYW5uZXIvdGFwLXNjYW5uZXItY29tbW9uL2JsZS1yc3NpLXNpZ25hbC9ibGUtcnNzaS1zaWduYWwuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsT0FBTyxFQUFFLFNBQVMsRUFBVSxLQUFLLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFPekQsTUFBTSxPQUFPLHNCQUFzQjtJQVNqQztRQU5TLFNBQUksR0FBVyxDQUFDLENBQUM7UUFPeEIsSUFBSSxDQUFDLFNBQVMsR0FBRyxDQUFDLFNBQVMsRUFBRSxTQUFTLEVBQUMsU0FBUyxFQUFDLFNBQVMsRUFBRSxTQUFTLENBQUMsQ0FBQztJQUN6RSxDQUFDOzs7OztJQU5ELElBQWEsTUFBTSxDQUFDLE1BQWdCO1FBQ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