import { __assign, __rest } from "tslib";
import React from "react";
import Label from "../Label";
import P1 from "../typography/P1";
import { BannerStyled, ContentWrapper, ActionsWrapper, ButtonStyled } from "./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 = __rest(_a, ["status", "isIcon", "message", "title", "secondaryButton", "onPrimaryClick", "type", "primaryTitle", "className", "style"]);
    return (React.createElement(BannerStyled, __assign({ type: type, className: className, style: style }, props),
        React.createElement(ContentWrapper, null,
            React.createElement(Label, { status: status, isIcon: isIcon }, title),
            React.createElement(P1, { type: "phoenix", className: "banner-message" }, message)),
        React.createElement(ActionsWrapper, null,
            secondaryButton && (React.createElement(ButtonStyled, { viewType: "ghost", size: "xs", onClick: secondaryButton.onClick }, secondaryButton.title)),
            React.createElement(ButtonStyled, { viewType: "primary", size: "xs", onClick: onPrimaryClick }, primaryTitle || "Закрыть"))));
};
export default Banner;
