"use strict";
var __assign = (this && this.__assign) || function () {
    __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;
    };
    return __assign.apply(this, arguments);
};
var __rest = (this && this.__rest) || function (s, e) {
    var t = {};
    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
        t[p] = s[p];
    if (s != null && typeof Object.getOwnPropertySymbols === "function")
        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
                t[p[i]] = s[p[i]];
        }
    return t;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Banner = void 0;
var Flex_1 = require("../Flex");
var material_1 = require("@mui/material");
var react_1 = __importDefault(require("react"));
var colors_1 = require("../../base/colors");
var Banner = function (_a) {
    var label = _a.label, icon = _a.icon, button = _a.button, _b = _a.mb, mb = _b === void 0 ? 0 : _b, _c = _a.bgcolor, bgcolor = _c === void 0 ? "" + colors_1.blue.light : _c, _d = _a.justifyContent, justifyContent = _d === void 0 ? "center" : _d, _e = _a.alignItems, alignItems = _e === void 0 ? "center" : _e, _f = _a.className, className = _f === void 0 ? "" : _f, _g = _a.labelProps, labelProps = _g === void 0 ? {} : _g, _h = _a.style, style = _h === void 0 ? {} : _h, props = __rest(_a, ["label", "icon", "button", "mb", "bgcolor", "justifyContent", "alignItems", "className", "labelProps", "style"]);
    var labelIsString = typeof label === "string";
    var defaultStyle = {
        fontWeight: 500,
        borderRadius: 4,
        width: "100%",
        height: 40,
        zIndex: 1001,
    };
    return (react_1.default.createElement(Flex_1.Flex, __assign({ p: 1, mb: mb, bgcolor: bgcolor, justifyContent: justifyContent, alignItems: alignItems, className: className, style: __assign(__assign({}, defaultStyle), style) }, props),
        react_1.default.createElement(Flex_1.Flex, { alignItems: "center" },
            icon && react_1.default.createElement(Flex_1.Flex, { mr: 1 }, icon),
            labelIsString ? (react_1.default.createElement(material_1.Typography, __assign({ variant: "subtitle2" }, labelProps), label)) : (label)),
        button && react_1.default.createElement(Flex_1.Flex, { ml: 2 }, button)));
};
exports.Banner = Banner;
//# sourceMappingURL=Banner.js.map