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__emotion_css__ from "@emotion/css";
import * as __WEBPACK_EXTERNAL_MODULE__ScrollAssistantStatus_provider_mjs__ from "./ScrollAssistantStatus.provider.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__useJoystick_mjs__ from "./useJoystick.mjs";
function _tagged_template_literal(strings, raw) {
    if (!raw) raw = strings.slice(0);
    return Object.freeze(Object.defineProperties(strings, {
        raw: {
            value: Object.freeze(raw)
        }
    }));
}
function _templateObject() {
    const data = _tagged_template_literal([
        "\n            position: absolute;\n            top: 0;\n            left: 500px;\n            right: 500px;\n            height: var(--tb-header-height);\n            z-index: 99999;\n            background-color: rgba(226, 252, 173, 0.274);\n          "
    ]);
    _templateObject = function() {
        return data;
    };
    return data;
}
const ScrollAssistantProvider = (param)=>{
    let { children } = param;
    const { enable, setEnable } = (0, __WEBPACK_EXTERNAL_MODULE__ScrollAssistantStatus_provider_mjs__.useScrollAssistantStatus)();
    const ref = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)();
    (0, __WEBPACK_EXTERNAL_MODULE__useJoystick_mjs__.useJoystick)(ref, {
        onContextmenu () {
            setEnable(false);
        }
    });
    return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsxs)(__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.Fragment, {
        children: [
            children,
            enable && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("div", {
                ref: ref,
                className: (0, __WEBPACK_EXTERNAL_MODULE__emotion_css__.css)(_templateObject())
            })
        ]
    });
};
export { ScrollAssistantProvider };
