"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AddExpressionButton = void 0;
const tslib_1 = require("tslib");
const jsx_runtime_1 = require("react/jsx-runtime");
const styled_components_1 = tslib_1.__importDefault(require("styled-components"));
const RegisterExpressionRuleEditor_1 = require("./RegisterExpressionRuleEditor");
const AddExpressionButton = function (props) {
    return ((0, jsx_runtime_1.jsxs)(ToolboxItem, { hideLabel: props.hideLabel, onClick: () => {
            props.onClick(props.registration);
        }, "data-testid": `expression-${props.registration.name}`, children: [(0, jsx_runtime_1.jsx)(ToolboxItemIcon, { children: (0, RegisterExpressionRuleEditor_1.GetExpressionRuleIcon)(props.registration.type) }), !props.hideLabel && (0, jsx_runtime_1.jsx)(ToolboxItemText, { children: props.registration.name })] }));
};
exports.AddExpressionButton = AddExpressionButton;
const ToolboxItem = (0, styled_components_1.default)("div") `
    display: flex;
    flex-direction: row;

    float: left;
    box-sizing: border-box;
    border-radius: 4px;
    height: 32px;

    color: #272932;

    font-size: 11px;
    font-style: normal;
    font-weight: 400;
    line-height: 15px;
    letter-spacing: 0em;
    text-align: left;

    align-items: center;
    cursor: pointer;
`;
const ToolboxItemIcon = styled_components_1.default.div `
    display: flex;
    border: 1px solid rgba(64, 80, 166, 0.15);
    width: 38px;
    height: 32px;
    box-sizing: border-box;
    border-radius: 4px;
    align-items: center;
    justify-content: center;
`;
const ToolboxItemText = styled_components_1.default.div `
    display: flex;
    float: left;
    margin-left: 8px;
    //styleName: text/Inter Regular 11px;

    font-size: 11px;
    font-style: normal;
    font-weight: 400;
    line-height: 15px;
    letter-spacing: 0em;
    text-align: left;

    color: #272932;

    flex: 1;
`;
//# sourceMappingURL=AddExpressionButton.js.map