"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const config_adapter_1 = require("../config-adapter");
function GaugeComponentAdapter(input) {
    const type = input.accessor.value('GUI_renderType', 'string');
    const { accessor, variable, extraOptions } = input;
    let gaugeComponent = {
        editable: extraOptions.editable,
        type: 'VariableGauge',
        unit: variable.unit,
        variable: `${variable.name}`,
        min: accessor.value('GUI_min', 'number', undefined),
        max: accessor.value('GUI_max', 'number', undefined),
        valueFormatting: input.accessor.value('GUI_valueFormatting', 'string', undefined),
        digitsInfo: config_adapter_1.extractDigitsInfo(input.variableConfig),
        options: {
            alias: extraOptions.title || variable.name,
            '[legend]': !extraOptions.showInCard
        }
    };
    return gaugeComponent;
}
exports.default = GaugeComponentAdapter;
//# sourceMappingURL=GaugeAdapter.js.map