define(["require", "exports", "tslib", "react", "./Icon.Props", "../Image/Image", "../../Utilities", "../../Styling", "./Icon.classNames"], function (require, exports, tslib_1, React, Icon_Props_1, Image_1, Utilities_1, Styling_1, Icon_classNames_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.Icon = function (props) {
        var ariaLabel = props.ariaLabel, className = props.className, styles = props.styles, iconName = props.iconName;
        var classNames = Icon_classNames_1.getClassNames(styles);
        if (props.iconType === Icon_Props_1.IconType.image || props.iconType === Icon_Props_1.IconType.Image) {
            var containerClassName = Utilities_1.css('ms-Icon', 'ms-Icon-imageContainer', classNames.root, classNames.imageContainer, className);
            return (React.createElement("div", { className: Utilities_1.css(containerClassName, classNames.root) },
                React.createElement(Image_1.Image, tslib_1.__assign({}, props.imageProps))));
        }
        else {
            var iconDefinition = Styling_1.getIcon(iconName) || {
                subset: {
                    className: undefined
                },
                code: undefined
            };
            return (React.createElement("i", tslib_1.__assign({ "aria-label": ariaLabel }, (ariaLabel ? {} : {
                role: 'presentation',
                'aria-hidden': true,
                'data-icon-name': iconName,
            }), Utilities_1.getNativeProps(props, Utilities_1.htmlElementProperties), { className: Utilities_1.css('ms-Icon', // dangerous?
                iconDefinition.subset.className, classNames.root, props.className) }), iconDefinition.code));
        }
    };
});
//# sourceMappingURL=Icon.js.map