"use strict";
var __webpack_require__ = {};
(()=>{
    __webpack_require__.n = (module)=>{
        var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
        __webpack_require__.d(getter, {
            a: getter
        });
        return getter;
    };
})();
(()=>{
    __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__, {
    ApBadge: ()=>ApBadge
});
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
const material_namespaceObject = require("@mui/material");
const apollo_core_namespaceObject = require("@uipath/apollo-core");
var apollo_core_default = /*#__PURE__*/ __webpack_require__.n(apollo_core_namespaceObject);
const external_react_namespaceObject = require("react");
var external_react_default = /*#__PURE__*/ __webpack_require__.n(external_react_namespaceObject);
const external_ApBadge_types_cjs_namespaceObject = require("./ApBadge.types.cjs");
const StyledBadge = (0, material_namespaceObject.styled)(material_namespaceObject.Chip, {
    shouldForwardProp: (prop)=>'badgeSize' !== prop && 'badgeStatus' !== prop
})(({ badgeSize, badgeStatus })=>{
    let backgroundColor;
    let textColor;
    switch(badgeStatus){
        case 'error':
            backgroundColor = 'var(--color-error-background)';
            textColor = 'var(--color-error-text)';
            break;
        case 'warning':
            backgroundColor = 'var(--color-warning-background)';
            textColor = 'var(--color-warning-text)';
            break;
        case 'info':
            backgroundColor = 'var(--color-info-background)';
            textColor = 'var(--color-info-text)';
            break;
        case 'success':
            backgroundColor = 'var(--color-success-background)';
            textColor = 'var(--color-success-text)';
            break;
        default:
            backgroundColor = 'var(--color-background-secondary)';
            textColor = 'var(--color-foreground)';
    }
    return {
        backgroundColor,
        color: textColor,
        fontWeight: apollo_core_default().FontFamily.FontWeightSemibold,
        height: 'small' === badgeSize ? apollo_core_default().Spacing.SpacingBase : apollo_core_default().Spacing.SpacingL,
        fontSize: 'small' === badgeSize ? apollo_core_default().FontFamily.FontXsSize : apollo_core_default().FontFamily.FontMSize,
        lineHeight: 'small' === badgeSize ? apollo_core_default().FontFamily.FontSLineHeight : apollo_core_default().FontFamily.FontMLineHeight,
        padding: 'small' === badgeSize ? `${apollo_core_default().Padding.PadXs} ${apollo_core_default().Padding.PadL}` : `${apollo_core_default().Padding.PadS} ${apollo_core_default().Padding.PadL}`,
        '.MuiChip-label': {
            padding: 'small' === badgeSize ? '0' : `${apollo_core_default().Spacing.SpacingMicro} ${apollo_core_default().Spacing.SpacingS}`
        },
        '&.MuiChip-root:hover': {
            backgroundColor
        }
    };
});
const ApBadge = /*#__PURE__*/ external_react_default().forwardRef(({ label, size = external_ApBadge_types_cjs_namespaceObject.BadgeSize.SMALL, status = 'default', className, style }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(StyledBadge, {
        ref: ref,
        label: label,
        badgeSize: size,
        badgeStatus: status,
        className: className,
        style: style
    }));
ApBadge.displayName = 'ApBadge';
exports.ApBadge = __webpack_exports__.ApBadge;
for(var __rspack_i in __webpack_exports__)if (-1 === [
    "ApBadge"
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
Object.defineProperty(exports, '__esModule', {
    value: true
});
