"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Legend = void 0;
var react_1 = __importDefault(require("react"));
var Typography_1 = __importDefault(require("@mui/material/Typography"));
var mdm_sdk_1 = require("@reltio/mdm-sdk");
var classnames_1 = __importDefault(require("classnames"));
var styles_1 = require("./styles");
var Legend = function (_a) {
    var minValue = _a.minValue, maxValue = _a.maxValue, colors = _a.colors, width = _a.width;
    var styles = (0, styles_1.useStyles)({
        colors: colors,
        width: width
    });
    return (react_1.default.createElement("div", { "data-reltio-id": "map-chart-legend", className: styles.legendContainer },
        react_1.default.createElement(Typography_1.default, { "data-reltio-id": "max-legend-metric", className: (0, classnames_1.default)(styles.legendLabel, styles.alignTop) }, (0, mdm_sdk_1.formatNumberAsMetric)(maxValue)),
        react_1.default.createElement("div", { className: styles.legendBar }),
        react_1.default.createElement(Typography_1.default, { "data-reltio-id": "min-legend-metric", className: (0, classnames_1.default)(styles.legendLabel, styles.alignBottom) }, (0, mdm_sdk_1.formatNumberAsMetric)(minValue))));
};
exports.Legend = Legend;
