import { Component, Input } from '@angular/core';
import * as i0 from "@angular/core";
export class BleRssiSignalComponent {
    constructor() {
        this.bars = 0;
        this._colorMap = ['#E51E25', '#FEC212', '#FEC212', '#0FAF4B', '#0FAF4B'];
    }
    set colors(colors) {
        this._colorMap = colors;
    }
    get color() {
        const safeIndex = Math.max(0, Math.min(this.bars, this._colorMap.length));
        return this._colorMap[safeIndex];
    }
}
/** @nocollapse */ BleRssiSignalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BleRssiSignalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
/** @nocollapse */ BleRssiSignalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: BleRssiSignalComponent, selector: "tap-ble-rssi-signal", inputs: { bars: "bars", colors: "colors" }, ngImport: i0, template: "<div class=\"rssi-container\">\n  <svg\n    version=\"1.1\"\n    viewBox=\"0 0 512 512\"\n    xmlns=\"http://www.w3.org/2000/svg\"\n    xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n    class=\"chart\"\n    aria-labelledby=\"title\"\n    role=\"img\"\n  >\n    <svg x=\"6\" class=\"bar\" [attr.color]=\"color\">\n      <rect\n        height=\"100\"\n        x=\"10\"\n        y=\"400\"\n        width=\"80\"\n        rx=\"30\"\n        [attr.fill-opacity]=\"bars >= 1 ? 1 : 0\"\n      ></rect>\n    </svg>\n    <svg x=\"106\" class=\"bar\" [attr.color]=\"color\">\n      <rect\n        height=\"200\"\n        x=\"10\"\n        y=\"300\"\n        width=\"80\"\n        rx=\"30\"\n        [attr.fill-opacity]=\"bars >= 2 ? 1 : 0\"\n      ></rect>\n    </svg>\n    <svg x=\"206\" class=\"bar\" [attr.color]=\"color\">\n      <rect\n        height=\"300\"\n        x=\"10\"\n        y=\"200\"\n        width=\"80\"\n        rx=\"30\"\n        [attr.fill-opacity]=\"bars >= 3 ? 1 : 0\"\n      ></rect>\n    </svg>\n    <svg x=\"306\" class=\"bar\" [attr.color]=\"color\">\n      <rect\n        height=\"400\"\n        x=\"10\"\n        y=\"100\"\n        width=\"80\"\n        rx=\"30\"\n        [attr.fill-opacity]=\"bars >= 4 ? 1 : 0\"\n      ></rect>\n    </svg>\n    <svg x=\"406\" class=\"bar\" [attr.color]=\"color\">\n      <rect\n        height=\"500\"\n        x=\"10\"\n        width=\"80\"\n        rx=\"30\"\n        [attr.fill-opacity]=\"bars >= 5 ? 1 : 0\"\n      ></rect>\n    </svg>\n  </svg>\n</div>\n", styles: [".rssi-container{display:inline-block;width:1em;height:1em;contain:strict}.bar rect{fill:currentColor;stroke:#000;stroke-width:3}\n"] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BleRssiSignalComponent, decorators: [{
            type: Component,
            args: [{ selector: 'tap-ble-rssi-signal', template: "<div class=\"rssi-container\">\n  <svg\n    version=\"1.1\"\n    viewBox=\"0 0 512 512\"\n    xmlns=\"http://www.w3.org/2000/svg\"\n    xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n    class=\"chart\"\n    aria-labelledby=\"title\"\n    role=\"img\"\n  >\n    <svg x=\"6\" class=\"bar\" [attr.color]=\"color\">\n      <rect\n        height=\"100\"\n        x=\"10\"\n        y=\"400\"\n        width=\"80\"\n        rx=\"30\"\n        [attr.fill-opacity]=\"bars >= 1 ? 1 : 0\"\n      ></rect>\n    </svg>\n    <svg x=\"106\" class=\"bar\" [attr.color]=\"color\">\n      <rect\n        height=\"200\"\n        x=\"10\"\n        y=\"300\"\n        width=\"80\"\n        rx=\"30\"\n        [attr.fill-opacity]=\"bars >= 2 ? 1 : 0\"\n      ></rect>\n    </svg>\n    <svg x=\"206\" class=\"bar\" [attr.color]=\"color\">\n      <rect\n        height=\"300\"\n        x=\"10\"\n        y=\"200\"\n        width=\"80\"\n        rx=\"30\"\n        [attr.fill-opacity]=\"bars >= 3 ? 1 : 0\"\n      ></rect>\n    </svg>\n    <svg x=\"306\" class=\"bar\" [attr.color]=\"color\">\n      <rect\n        height=\"400\"\n        x=\"10\"\n        y=\"100\"\n        width=\"80\"\n        rx=\"30\"\n        [attr.fill-opacity]=\"bars >= 4 ? 1 : 0\"\n      ></rect>\n    </svg>\n    <svg x=\"406\" class=\"bar\" [attr.color]=\"color\">\n      <rect\n        height=\"500\"\n        x=\"10\"\n        width=\"80\"\n        rx=\"30\"\n        [attr.fill-opacity]=\"bars >= 5 ? 1 : 0\"\n      ></rect>\n    </svg>\n  </svg>\n</div>\n", styles: [".rssi-container{display:inline-block;width:1em;height:1em;contain:strict}.bar rect{fill:currentColor;stroke:#000;stroke-width:3}\n"] }]
        }], ctorParameters: function () { return []; }, propDecorators: { bars: [{
                type: Input
            }], colors: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64, 