"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Details = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const constants_1 = require("../constants");
const ErrorState_1 = require("./ErrorState");
const LoadingState_1 = require("./LoadingState");
const styles_1 = require("./styles");
const Details = (props) => {
    const { children, isLoading, isError, errorMsg, onRetry } = props;
    const isSuccess = !isLoading && !isError;
    return ((0, jsx_runtime_1.jsx)(styles_1.Wrapper, { className: constants_1.expansionPanelClassnames.details, children: (0, jsx_runtime_1.jsxs)(styles_1.StateWrapper, { children: [isLoading && (0, jsx_runtime_1.jsx)(LoadingState_1.LoadingState, {}), isError && (0, jsx_runtime_1.jsx)(ErrorState_1.ErrorState, { errorMsg: errorMsg, onRetry: onRetry }), isSuccess && children] }) }));
};
exports.Details = Details;
