"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LoadingPlaceholder = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const Loader_1 = require("../../Loader");
const Typography_1 = require("../../Typography");
const classNames_1 = require("../../utils/classNames");
const constants_1 = require("./constants");
const styles_1 = require("./styles");
/**
 * Дефолтный лоадер загрузки
 */
const LoadingPlaceholder = ({ title, content, isShowLoader = true, className, }) => {
    if (!isShowLoader) {
        return ((0, jsx_runtime_1.jsx)(styles_1.LoadingContainer, { className: (0, classNames_1.classNames)(constants_1.loadingPlaceholderClassnames.root, className) }));
    }
    if (content) {
        return ((0, jsx_runtime_1.jsx)(styles_1.LoadingContainer, { className: (0, classNames_1.classNames)(constants_1.loadingPlaceholderClassnames.root, className), children: content }));
    }
    return ((0, jsx_runtime_1.jsxs)(styles_1.LoadingContainer, { className: (0, classNames_1.classNames)(constants_1.loadingPlaceholderClassnames.root, className), children: [(0, jsx_runtime_1.jsx)(Loader_1.Loader, {}), title && (0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "h4", children: title })] }));
};
exports.LoadingPlaceholder = LoadingPlaceholder;
