"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Label = void 0;
const react_1 = __importDefault(require("react"));
const inlines_1 = require("inlines");
const __1 = require("../../");
const Label = ({ label, description, children, style, labelWidth, }) => {
    if (!label && !description) {
        return null;
    }
    return (react_1.default.createElement(inlines_1.styled.div, { style: {
            margin: 8,
            maxWidth: 'min-content',
            display: 'flex',
            alignItems: 'center',
            flexDirection: 'row',
            ...style,
        } },
        react_1.default.createElement(inlines_1.styled.div, { style: {
                minWidth: labelWidth,
                display: 'flex',
                marginRight: 16,
                flexDirection: 'column',
            } },
            react_1.default.createElement(__1.Row, null,
                react_1.default.createElement(__1.Text, { style: { marginBottom: description ? 0 : 0 }, weight: "strong" }, label)),
            description && react_1.default.createElement(__1.Text, { light: true }, description)),
        children));
};
exports.Label = Label;
//# sourceMappingURL=Label.js.map