"use strict";
// The require scope
var __webpack_require__ = {};
/************************************************************************/ // webpack/runtime/define_property_getters
(()=>{
    __webpack_require__.d = function(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/runtime/has_own_property
(()=>{
    __webpack_require__.o = function(obj, prop) {
        return Object.prototype.hasOwnProperty.call(obj, prop);
    };
})();
// webpack/runtime/make_namespace_object
(()=>{
    // define __esModule on exports
    __webpack_require__.r = function(exports1) {
        if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
            value: 'Module'
        });
        Object.defineProperty(exports1, '__esModule', {
            value: true
        });
    };
})();
/************************************************************************/ var __webpack_exports__ = {};
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
    default: ()=>/* binding */ NumberInput_rslib_entry_
});
const icons_namespaceObject = require("@chakra-ui/icons");
const react_namespaceObject = require("@chakra-ui/react");
const NumberInput = ({ placeholder, name, step, showIconButtons = true, ...props })=>{
    const { getInputProps, getIncrementButtonProps, getDecrementButtonProps } = (0, react_namespaceObject.useNumberInput)({
        step,
        ...props
    });
    const color = (0, react_namespaceObject.useColorModeValue)('gray.300', 'whiteAlpha.500');
    const increment = getIncrementButtonProps();
    const decrement = getDecrementButtonProps();
    const input = getInputProps();
    return /*#__PURE__*/ React.createElement(react_namespaceObject.NumberInput, {
        ...props,
        name: name,
        step: step
    }, /*#__PURE__*/ React.createElement(react_namespaceObject.HStack, {
        maxW: "320px"
    }, /*#__PURE__*/ React.createElement(react_namespaceObject.Input, {
        ...input,
        "data-testid": `${name}_field`,
        placeholder: placeholder,
        type: step ? 'decimal' : 'numeric'
    }), showIconButtons && /*#__PURE__*/ React.createElement(react_namespaceObject.ButtonGroup, null, /*#__PURE__*/ React.createElement(react_namespaceObject.IconButton, {
        ...increment,
        "aria-label": "number-input-add-icon",
        "data-testid": "number-input-add-icon",
        icon: /*#__PURE__*/ React.createElement(icons_namespaceObject.AddIcon, {
            color: color
        }),
        variant: "inputOutline",
        size: "xs",
        p: 0,
        color: color
    }), /*#__PURE__*/ React.createElement(react_namespaceObject.IconButton, {
        ...decrement,
        "aria-label": "number-input-minus-icon",
        "data-testid": "number-input-minus-icon",
        icon: /*#__PURE__*/ React.createElement(icons_namespaceObject.MinusIcon, {
            color: color
        }),
        variant: "inputOutline",
        size: "xs",
        p: 0,
        color: color
    }))));
};
/* ESM default export */ const NumberInput_rslib_entry_ = NumberInput;
var __webpack_export_target__ = exports;
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
    value: true
});
