"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__, {
    PickerPopup: ()=>PickerPopup
});
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
const Box_namespaceObject = require("@mui/material/Box");
var Box_default = /*#__PURE__*/ __webpack_require__.n(Box_namespaceObject);
const ClickAwayListener_namespaceObject = require("@mui/material/ClickAwayListener");
var ClickAwayListener_default = /*#__PURE__*/ __webpack_require__.n(ClickAwayListener_namespaceObject);
const Paper_namespaceObject = require("@mui/material/Paper");
var Paper_default = /*#__PURE__*/ __webpack_require__.n(Paper_namespaceObject);
const Popper_namespaceObject = require("@mui/material/Popper");
var Popper_default = /*#__PURE__*/ __webpack_require__.n(Popper_namespaceObject);
const apollo_core_namespaceObject = require("@uipath/apollo-core");
const PickerPopup = ({ open, anchorEl, onClose, width, placement = 'bottom-start', zIndex = 1400, header, footer, className, 'data-testid': dataTestId, children })=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Popper_default(), {
        open: open,
        anchorEl: anchorEl,
        placement: placement,
        style: {
            zIndex,
            width: width ?? anchorEl?.clientWidth
        },
        modifiers: [
            {
                name: 'offset',
                options: {
                    offset: [
                        0,
                        6
                    ]
                }
            }
        ],
        children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ClickAwayListener_default(), {
            onClickAway: onClose,
            children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(Paper_default(), {
                elevation: 0,
                className: className,
                "data-testid": dataTestId,
                sx: {
                    borderRadius: '10px',
                    overflow: 'hidden',
                    border: '1px solid',
                    borderColor: `var(--color-border-de-emp, ${apollo_core_namespaceObject.Colors.ColorGray300})`,
                    backgroundColor: `var(--color-background-raised, ${apollo_core_namespaceObject.Colors.ColorWhite})`,
                    boxShadow: '0 12px 30px rgba(16, 24, 40, 0.10), 0 2px 6px rgba(16, 24, 40, 0.04)',
                    display: 'flex',
                    flexDirection: 'column'
                },
                children: [
                    header,
                    /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Box_default(), {
                        sx: {
                            flex: 1,
                            minHeight: 0
                        },
                        children: children
                    }),
                    footer && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Box_default(), {
                        sx: {
                            borderTop: '1px solid',
                            borderColor: `var(--color-border-de-emp, ${apollo_core_namespaceObject.Colors.ColorGray300})`,
                            backgroundColor: `var(--color-background-raised, ${apollo_core_namespaceObject.Colors.ColorWhite})`
                        },
                        children: footer
                    })
                ]
            })
        })
    });
exports.PickerPopup = __webpack_exports__.PickerPopup;
for(var __rspack_i in __webpack_exports__)if (-1 === [
    "PickerPopup"
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
Object.defineProperty(exports, '__esModule', {
    value: true
});
