"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.EmptyState = exports.EMPTY_STATE_ICONS = exports.EMPTY_STATE_VARIANTS = void 0;
var react_1 = __importDefault(require("react"));
var classnames_1 = __importDefault(require("classnames"));
var ramda_1 = require("ramda");
var Typography_1 = __importDefault(require("@mui/material/Typography"));
var Button_1 = __importDefault(require("@mui/material/Button"));
var EmptySearchResults_1 = __importDefault(require("../icons/EmptySearchResults"));
var SelectAttributes_1 = __importDefault(require("../icons/SelectAttributes"));
var NoData_1 = __importDefault(require("../icons/NoData"));
var Error_1 = __importDefault(require("../icons/Error"));
var NoLogs_1 = __importDefault(require("../icons/NoLogs"));
var NoActivations_1 = __importDefault(require("../icons/NoActivations"));
var styles_1 = require("./styles");
var EmptyLoading_1 = __importDefault(require("../icons/EmptyLoading"));
var EMPTY_STATE_VARIANTS;
(function (EMPTY_STATE_VARIANTS) {
    EMPTY_STATE_VARIANTS["full"] = "full";
    EMPTY_STATE_VARIANTS["embedded"] = "embedded";
    EMPTY_STATE_VARIANTS["small"] = "small";
})(EMPTY_STATE_VARIANTS || (exports.EMPTY_STATE_VARIANTS = EMPTY_STATE_VARIANTS = {}));
exports.EMPTY_STATE_ICONS = {
    SEARCH_RESULTS: EmptySearchResults_1.default,
    SELECT_ATTRIBUTES: SelectAttributes_1.default,
    NO_DATA: NoData_1.default,
    ERROR: Error_1.default,
    LOADING: EmptyLoading_1.default,
    NO_LOGS: NoLogs_1.default,
    NO_ACTIVATIONS: NoActivations_1.default
};
var EmptyState = function (_a) {
    var _b = _a.variant, variant = _b === void 0 ? EMPTY_STATE_VARIANTS.full : _b, _c = _a.LogoRenderer, LogoRenderer = _c === void 0 ? exports.EMPTY_STATE_ICONS.SEARCH_RESULTS : _c, text = _a.text, secondaryText = _a.secondaryText, buttonTitle = _a.buttonTitle, _d = _a.onClick, onClick = _d === void 0 ? ramda_1.identity : _d, access = _a.access, children = _a.children;
    var styles = (0, styles_1.useStyles)();
    var showButton = access && buttonTitle;
    return (react_1.default.createElement("div", { className: (0, classnames_1.default)(styles.root, styles["root_".concat(variant)]) },
        react_1.default.createElement(LogoRenderer, { className: styles["".concat(variant)] }),
        react_1.default.createElement("div", { className: styles.textBox },
            react_1.default.createElement(Typography_1.default, { variant: "h5", classes: { h5: styles.text } }, text),
            secondaryText && (react_1.default.createElement(Typography_1.default, { variant: "subtitle1", classes: { subtitle1: styles.secondaryText } }, secondaryText))),
        children,
        showButton && (react_1.default.createElement(Button_1.default, { className: styles.button, variant: "contained", color: "primary", onClick: onClick }, buttonTitle))));
};
exports.EmptyState = EmptyState;
