"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__, {
    PickerSearchInput: ()=>PickerSearchInput
});
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
const Search_namespaceObject = require("@mui/icons-material/Search");
var Search_default = /*#__PURE__*/ __webpack_require__.n(Search_namespaceObject);
const Box_namespaceObject = require("@mui/material/Box");
var Box_default = /*#__PURE__*/ __webpack_require__.n(Box_namespaceObject);
const InputBase_namespaceObject = require("@mui/material/InputBase");
var InputBase_default = /*#__PURE__*/ __webpack_require__.n(InputBase_namespaceObject);
const apollo_core_namespaceObject = require("@uipath/apollo-core");
const index_cjs_namespaceObject = require("../../../../i18n/index.cjs");
const PickerSearchInput = ({ value, onChange, onKeyDown, placeholder, 'aria-label': ariaLabel, activeDescendantId, inputRef, listboxId, dense, leading, trailing, className, 'data-testid': dataTestId })=>{
    const { _ } = (0, index_cjs_namespaceObject.useSafeLingui)();
    const resolvedPlaceholder = placeholder ?? _({
        id: 'modelPicker.search.placeholder',
        message: 'Search models'
    });
    return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(Box_default(), {
        className: className,
        sx: {
            display: 'flex',
            alignItems: 'center',
            gap: 1,
            p: dense ? 1.25 : 1.5,
            borderBottom: '1px solid',
            borderColor: `var(--color-border-de-emp, ${apollo_core_namespaceObject.Colors.ColorGray300})`,
            backgroundColor: `var(--color-background-raised, ${apollo_core_namespaceObject.Colors.ColorWhite})`
        },
        children: [
            leading && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Box_default(), {
                sx: {
                    display: 'flex',
                    alignItems: 'center',
                    flexShrink: 0
                },
                children: leading
            }),
            /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(Box_default(), {
                sx: {
                    flex: 1,
                    minWidth: 0,
                    display: 'flex',
                    alignItems: 'center',
                    gap: 0.75,
                    border: '1px solid',
                    borderColor: `var(--color-border-de-emp, ${apollo_core_namespaceObject.Colors.ColorGray300})`,
                    borderRadius: '8px',
                    px: 1.25,
                    py: dense ? 0.5 : 0.75,
                    backgroundColor: `var(--color-background-raised, ${apollo_core_namespaceObject.Colors.ColorWhite})`,
                    transition: 'border-color 120ms',
                    '&:focus-within': {
                        borderColor: `var(--color-primary, ${apollo_core_namespaceObject.Colors.ColorBlue500})`
                    }
                },
                children: [
                    /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Search_default(), {
                        sx: {
                            fontSize: dense ? 16 : 18,
                            color: `var(--color-foreground-disable, ${apollo_core_namespaceObject.Colors.ColorGray500})`
                        },
                        "aria-hidden": true
                    }),
                    /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(InputBase_default(), {
                        inputRef: inputRef,
                        value: value,
                        onChange: (e)=>onChange(e.target.value),
                        onKeyDown: onKeyDown,
                        placeholder: resolvedPlaceholder,
                        sx: {
                            flex: 1,
                            fontSize: dense ? 13 : 13.5,
                            color: `var(--color-foreground, ${apollo_core_namespaceObject.Colors.ColorGray850})`,
                            '& .MuiInputBase-input::placeholder': {
                                color: `var(--color-foreground-disable, ${apollo_core_namespaceObject.Colors.ColorGray500})`,
                                opacity: 1
                            }
                        },
                        inputProps: {
                            role: 'combobox',
                            'aria-label': ariaLabel ?? resolvedPlaceholder,
                            'aria-controls': listboxId,
                            'aria-autocomplete': 'list',
                            'aria-activedescendant': activeDescendantId,
                            'aria-expanded': true,
                            'data-testid': dataTestId
                        }
                    })
                ]
            }),
            trailing && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Box_default(), {
                sx: {
                    display: 'flex',
                    alignItems: 'center',
                    flexShrink: 0
                },
                children: trailing
            })
        ]
    });
};
exports.PickerSearchInput = __webpack_exports__.PickerSearchInput;
for(var __rspack_i in __webpack_exports__)if (-1 === [
    "PickerSearchInput"
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
Object.defineProperty(exports, '__esModule', {
    value: true
});
