"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ExpressionFunctionDocumentation = void 0;
const tslib_1 = require("tslib");
const rebass_1 = require("rebass");
const React = tslib_1.__importStar(require("react"));
const Tag_1 = require("../Tag");
const ExpressionFunctionDocumentation = (props) => {
    return props.expressionFunction ? (React.createElement(rebass_1.Box, { "data-name": "expression-editor-documentation", my: 2, p: 2, style: {
            background: 'var(--ab-color-primary)',
            borderRadius: 'var(--ab__border-radius)',
        } },
        props.expressionFunction.description && (React.createElement(rebass_1.Box, { mb: 3, style: { fontWeight: 'bold', whiteSpace: 'pre-wrap' }, "data-name": "expression-editor-documentation-description" }, props.expressionFunction.description)),
        props.expressionFunction.signatures && (React.createElement(rebass_1.Box, { "data-name": "expression-editor-documentation-signatures" },
            React.createElement("b", null, "Signatures"),
            React.createElement("ul", null, props.expressionFunction.signatures.map((signature, index) => (React.createElement("li", { key: index },
                React.createElement("pre", { style: { whiteSpace: 'pre-wrap', margin: 0 } }, signature))))))),
        props.expressionFunction.examples && (React.createElement(rebass_1.Box, { "data-name": "expression-editor-documentation-examples" },
            React.createElement("b", null, "Examples"),
            React.createElement("ul", null, props.expressionFunction.examples.map((example, index) => (React.createElement("li", { key: index },
                React.createElement("pre", { style: { whiteSpace: 'pre-wrap', margin: 0 } }, example))))))),
        props.expressionFunction.returnType && (React.createElement(rebass_1.Box, { "data-name": "expression-editor-documentation-examples" },
            React.createElement("b", null, "Return Type"),
            React.createElement(Tag_1.Tag, null, props.expressionFunction.returnType))))) : null;
};
exports.ExpressionFunctionDocumentation = ExpressionFunctionDocumentation;
