import React from 'react';
import classnames from 'classnames';
import { identity } from 'ramda';
import Typography from '@mui/material/Typography';
import Button from '@mui/material/Button';
import EmptySearchResultsIcon from '../icons/EmptySearchResults';
import SelectAttributesIcon from '../icons/SelectAttributes';
import NoData from '../icons/NoData';
import Error from '../icons/Error';
import NoLogs from '../icons/NoLogs';
import NoActivations from '../icons/NoActivations';
import { useStyles } from './styles';
import EmptyLoadingIcon from '../icons/EmptyLoading';
export 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 || (EMPTY_STATE_VARIANTS = {}));
export var EMPTY_STATE_ICONS = {
    SEARCH_RESULTS: EmptySearchResultsIcon,
    SELECT_ATTRIBUTES: SelectAttributesIcon,
    NO_DATA: NoData,
    ERROR: Error,
    LOADING: EmptyLoadingIcon,
    NO_LOGS: NoLogs,
    NO_ACTIVATIONS: NoActivations
};
export var EmptyState = function (_a) {
    var _b = _a.variant, variant = _b === void 0 ? EMPTY_STATE_VARIANTS.full : _b, _c = _a.LogoRenderer, LogoRenderer = _c === void 0 ? EMPTY_STATE_ICONS.SEARCH_RESULTS : _c, text = _a.text, secondaryText = _a.secondaryText, buttonTitle = _a.buttonTitle, _d = _a.onClick, onClick = _d === void 0 ? identity : _d, access = _a.access, children = _a.children;
    var styles = useStyles();
    var showButton = access && buttonTitle;
    return (React.createElement("div", { className: classnames(styles.root, styles["root_".concat(variant)]) },
        React.createElement(LogoRenderer, { className: styles["".concat(variant)] }),
        React.createElement("div", { className: styles.textBox },
            React.createElement(Typography, { variant: "h5", classes: { h5: styles.text } }, text),
            secondaryText && (React.createElement(Typography, { variant: "subtitle1", classes: { subtitle1: styles.secondaryText } }, secondaryText))),
        children,
        showButton && (React.createElement(Button, { className: styles.button, variant: "contained", color: "primary", onClick: onClick }, buttonTitle))));
};
