var __extends = (this && this.__extends) || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
define(["require", "exports", "react", "../../Utilities", "../../Button", "../../Image", "./TeachingBubble.scss"], function (require, exports, React, Utilities_1, Button_1, Image_1, TeachingBubble_scss_1) {
    "use strict";
    var TeachingBubbleContent = (function (_super) {
        __extends(TeachingBubbleContent, _super);
        // Constructor
        function TeachingBubbleContent(props) {
            var _this = _super.call(this, props) || this;
            _this._id = Utilities_1.getId('TeachingBubble');
            _this.state = {};
            return _this;
        }
        TeachingBubbleContent.prototype.render = function () {
            var _a = this.props, illustrationImage = _a.illustrationImage, primaryButtonProps = _a.primaryButtonProps, secondaryButtonProps = _a.secondaryButtonProps, headline = _a.headline, hasCondensedHeadline = _a.hasCondensedHeadline, hasCloseIcon = _a.hasCloseIcon, onDismiss = _a.onDismiss, closeButtonAriaLabel = _a.closeButtonAriaLabel;
            var imageContent;
            var headerContent;
            var bodyContent;
            var footerContent;
            var closeButton;
            if (illustrationImage && illustrationImage.src) {
                imageContent = (React.createElement("div", { className: 'ms-TeachingBubble-header' },
                    React.createElement(Image_1.Image, __assign({}, illustrationImage))));
            }
            if (headline) {
                headerContent = (React.createElement("div", { className: Utilities_1.css('ms-TeachingBubble-header', hasCondensedHeadline ?
                        'ms-TeachingBubble-header--small ' + TeachingBubble_scss_1.default.headerIsSmall :
                        'ms-TeachingBubble-header--large ' + TeachingBubble_scss_1.default.headerIsLarge) },
                    React.createElement("p", { className: Utilities_1.css('ms-TeachingBubble-headline', TeachingBubble_scss_1.default.headline) }, headline)));
            }
            if (this.props.children) {
                bodyContent = (React.createElement("div", { className: Utilities_1.css('ms-TeachingBubble-body', TeachingBubble_scss_1.default.body) },
                    React.createElement("p", { className: Utilities_1.css('ms-TeachingBubble-subText', TeachingBubble_scss_1.default.subText) }, this.props.children)));
            }
            if (primaryButtonProps || secondaryButtonProps) {
                footerContent = (React.createElement("div", { className: Utilities_1.css('ms-TeachingBubble-footer', TeachingBubble_scss_1.default.footer) },
                    primaryButtonProps && (React.createElement(Button_1.Button, __assign({}, primaryButtonProps, { className: Utilities_1.css('ms-TeachingBubble-primaryButton', TeachingBubble_scss_1.default.primaryButton, primaryButtonProps.className) }))),
                    secondaryButtonProps && (React.createElement(Button_1.Button, __assign({}, secondaryButtonProps, { className: Utilities_1.css('ms-TeachingBubble-secondaryButton', TeachingBubble_scss_1.default.secondaryButton, secondaryButtonProps.className) })))));
            }
            if (hasCloseIcon) {
                closeButton = (React.createElement(Button_1.Button, { className: Utilities_1.css('ms-TeachingBubble-closebutton', TeachingBubble_scss_1.default.closeButton), buttonType: Button_1.ButtonType.icon, icon: 'Cancel', title: closeButtonAriaLabel, ariaLabel: closeButtonAriaLabel, onClick: onDismiss }));
            }
            return (React.createElement("div", { className: Utilities_1.css('ms-TeachingBubble-content') },
                imageContent,
                closeButton,
                React.createElement("div", { className: Utilities_1.css('ms-TeachingBubble-bodycontent', TeachingBubble_scss_1.default.bodyContent) },
                    headerContent,
                    bodyContent,
                    footerContent)));
        };
        return TeachingBubbleContent;
    }(Utilities_1.BaseComponent));
    // Specify default props values
    TeachingBubbleContent.defaultProps = {
        hasCondensedHeadline: false,
        imageProps: {
            imageFit: Image_1.ImageFit.cover,
            width: 364,
            height: 130
        }
    };
    exports.TeachingBubbleContent = TeachingBubbleContent;
});

//# sourceMappingURL=TeachingBubbleContent.js.map
