"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "StepItem", {
    enumerable: true,
    get: function() {
        return StepItem;
    }
});
const _jsxruntime = require("react/jsx-runtime");
const _spinner = require("../../../spinner");
const _css = require("../../../utils/css");
const _lucidereact = require("lucide-react");
const _react = require("react");
const StepItem = (props)=>{
    const child = (0, _react.useMemo)(()=>{
        if (props.isLoading) {
            return /*#__PURE__*/ (0, _jsxruntime.jsx)(_spinner.Spinner, {
                size: "small"
            });
        }
        if (props.isCompleted) {
            // @ts-ignore
            return /*#__PURE__*/ (0, _jsxruntime.jsx)(_lucidereact.Check, {
                size: 20
            });
        }
        return props.children;
    }, [
        props.isLoading,
        props.isCompleted
    ]);
    return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
        className: (0, _css.cn)("orderly-flex orderly-items-center orderly-justify-center orderly-w-[32px] orderly-h-[32px] orderly-bg-base-100 orderly-rounded-full", props.active && "orderly-bg-primary", props.isLoading && "orderly-bg-white/10 orderly-border orderly-border-primary", props.isCompleted && "orderly-bg-white/10 orderly-border orderly-border-primary orderly-text-primary"),
        children: child
    });
};

//# sourceMappingURL=step.js.map