(function (factory) {
    if (typeof module === "object" && typeof module.exports === "object") {
        var v = factory(require, exports);
        if (v !== undefined) module.exports = v;
    }
    else if (typeof define === "function" && define.amd) {
        define(["require", "exports", "tslib", "react", "../Label", "../typography/P1", "./styles"], factory);
    }
})(function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var tslib_1 = require("tslib");
    var react_1 = (0, tslib_1.__importDefault)(require("react"));
    var Label_1 = (0, tslib_1.__importDefault)(require("../Label"));
    var P1_1 = (0, tslib_1.__importDefault)(require("../typography/P1"));
    var styles_1 = require("./styles");
    var Banner = function (_a) {
        var status = _a.status, isIcon = _a.isIcon, message = _a.message, title = _a.title, secondaryButton = _a.secondaryButton, onPrimaryClick = _a.onPrimaryClick, type = _a.type, primaryTitle = _a.primaryTitle, className = _a.className, style = _a.style, props = (0, tslib_1.__rest)(_a, ["status", "isIcon", "message", "title", "secondaryButton", "onPrimaryClick", "type", "primaryTitle", "className", "style"]);
        return (react_1.default.createElement(styles_1.BannerStyled, (0, tslib_1.__assign)({ type: type, className: className, style: style }, props),
            react_1.default.createElement(styles_1.ContentWrapper, null,
                react_1.default.createElement(Label_1.default, { status: status, isIcon: isIcon }, title),
                react_1.default.createElement(P1_1.default, { type: "phoenix", className: "banner-message" }, message)),
            react_1.default.createElement(styles_1.ActionsWrapper, null,
                secondaryButton && (react_1.default.createElement(styles_1.ButtonStyled, { viewType: "ghost", size: "xs", onClick: secondaryButton.onClick }, secondaryButton.title)),
                react_1.default.createElement(styles_1.ButtonStyled, { viewType: "primary", size: "xs", onClick: onPrimaryClick }, primaryTitle || "Закрыть"))));
    };
    exports.default = Banner;
});
