"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.RuleTypeRenderer = void 0;
var react_1 = __importDefault(require("react"));
var classnames_1 = __importDefault(require("classnames"));
var RuleTypeInfoButton_1 = require("../RuleTypeInfoButton");
var styles_1 = require("../../styles");
var styles_2 = require("./styles");
var RuleTypeRenderer = function (_a) {
    var _b = _a.value, ruleType = _b.ruleType, sourcesUriOrder = _b.sourcesUriOrder, primaryAttributeUri = _b.primaryAttributeUri, comparisonAttributeUri = _b.comparisonAttributeUri;
    var styles = (0, styles_2.useStyles)();
    var commonStyles = (0, styles_1.useCommonStyles)();
    var showInfoIcon = sourcesUriOrder || primaryAttributeUri || comparisonAttributeUri;
    return (react_1.default.createElement("div", { className: (0, classnames_1.default)(styles.root, commonStyles.basicCell) },
        react_1.default.createElement("div", { className: styles.label }, ruleType.label),
        showInfoIcon && (react_1.default.createElement(RuleTypeInfoButton_1.RuleTypeInfoButton, { info: {
                sourcesUriOrder: sourcesUriOrder,
                primaryAttributeUri: primaryAttributeUri,
                comparisonAttributeUri: comparisonAttributeUri
            } }))));
};
exports.RuleTypeRenderer = RuleTypeRenderer;
