import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime";
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
import * as __WEBPACK_EXTERNAL_MODULE_react_dom__ from "react-dom";
import * as __WEBPACK_EXTERNAL_MODULE__Calculator_mjs__ from "./Calculator.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__Draggable_mjs__ from "./Draggable.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__style_mjs__ from "./style.mjs";
const CalculatorContext = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.createContext)({});
const useCalculator = ()=>(0, __WEBPACK_EXTERNAL_MODULE_react__.useContext)(CalculatorContext);
const CalculatorProvider = (param)=>{
    let { children } = param;
    const [visible, setVisible] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(false);
    const { styles } = (0, __WEBPACK_EXTERNAL_MODULE__style_mjs__.useStyles)();
    return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsxs)(CalculatorContext.Provider, {
        value: {
            visible,
            setVisible
        },
        children: [
            children,
            visible ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_dom__.createPortal)(/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("div", {
                className: styles.container,
                children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__Draggable_mjs__.Draggable, {
                    children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__Calculator_mjs__.CalculatorWrapper, {})
                })
            }), document.body) : null
        ]
    });
};
export { CalculatorContext, CalculatorProvider, useCalculator };
