"use strict";
var __webpack_require__ = {};
(()=>{
    __webpack_require__.d = (exports1, definition)=>{
        for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
            enumerable: true,
            get: definition[key]
        });
    };
})();
(()=>{
    __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
})();
(()=>{
    __webpack_require__.r = (exports1)=>{
        if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
            value: 'Module'
        });
        Object.defineProperty(exports1, '__esModule', {
            value: true
        });
    };
})();
var __webpack_exports__ = {};
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
    BaseContainer: ()=>BaseContainer,
    getStatusBorder: ()=>getStatusBorder
});
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
const apollo_wind_namespaceObject = require("@uipath/apollo-wind");
const external_react_namespaceObject = require("react");
const getStatusBorder = (status)=>{
    switch(status){
        case 'InProgress':
            return 'border-info animate-glow [--glow-color:var(--info)]';
        case 'Completed':
        case 'add':
            return 'border-success';
        case 'Paused':
        case 'Warning':
        case 'WARNING':
        case 'update':
            return 'border-warning animate-glow [--glow-color:var(--warning)]';
        case 'Cancelled':
        case 'Failed':
        case 'Terminated':
        case 'ERROR':
        case 'CRITICAL':
        case 'delete':
            return 'border-error animate-glow [--glow-color:var(--error)]';
        default:
            return '';
    }
};
const BaseContainer = ({ isSelected, isHovered, isStacked, shape, interactionState, executionStatus, validationStatus, suggestionType, hasFooter, background, loading, children })=>{
    const activeStatus = suggestionType ?? validationStatus ?? executionStatus;
    const className = (0, external_react_namespaceObject.useMemo)(()=>(0, apollo_wind_namespaceObject.cn)('relative flex items-center cursor-pointer bg-surface-overlay border border-border', 'w-(--node-w) h-(--node-h) rounded-(--node-radius)', 'shadow-(--canvas-node-shadow-rest) outline-offset-0 transition-[box-shadow,border-color] duration-150', 'rectangle' === shape ? 'flex-row justify-start gap-3 p-(--node-gap)' : 'flex-col justify-center', hasFooter && 'flex-wrap', getStatusBorder(activeStatus), isHovered && 'shadow-(--canvas-node-shadow-hover) border-border-hover', isSelected && 'outline outline-2 outline-foreground-accent-muted', 'disabled' === interactionState && 'opacity-50 cursor-not-allowed', 'drag' === interactionState && 'cursor-grabbing shadow-(--canvas-node-shadow-lifted)', isStacked && 'before:content-[""] before:absolute before:inset-x-0 before:top-0 before:h-full before:rounded-[inherit] before:bg-surface-overlay before:border before:border-brand before:translate-y-[6px] before:-z-10 before:pointer-events-none'), [
        shape,
        hasFooter,
        activeStatus,
        isSelected,
        isHovered,
        isStacked,
        interactionState
    ]);
    return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
        "data-testid": "base-container",
        "data-execution-status": executionStatus,
        "data-interaction-state": interactionState,
        "data-validation-status": validationStatus,
        "data-suggestion-type": suggestionType,
        "data-stacked": isStacked || void 0,
        className: className,
        style: background ? {
            background
        } : void 0,
        "aria-busy": loading || void 0,
        children: children
    });
};
exports.BaseContainer = __webpack_exports__.BaseContainer;
exports.getStatusBorder = __webpack_exports__.getStatusBorder;
for(var __rspack_i in __webpack_exports__)if (-1 === [
    "BaseContainer",
    "getStatusBorder"
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
Object.defineProperty(exports, '__esModule', {
    value: true
});
