import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime";
import "react";
import * as __WEBPACK_EXTERNAL_MODULE_antd__ from "antd";
import * as __WEBPACK_EXTERNAL_MODULE_react_hotkeys_hook__ from "react-hotkeys-hook";
import * as __WEBPACK_EXTERNAL_MODULE_react_i18next__ from "react-i18next";
import * as __WEBPACK_EXTERNAL_MODULE__index_mjs__ from "../index.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__icon_index_mjs__ from "../../icon/index.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__style_index_mjs__ from "../../style/index.mjs";
const DesignableSwitch = ()=>{
    const { designable, setDesignable } = (0, __WEBPACK_EXTERNAL_MODULE__index_mjs__.useDesignable)();
    const { t } = (0, __WEBPACK_EXTERNAL_MODULE_react_i18next__.useTranslation)();
    const { token } = (0, __WEBPACK_EXTERNAL_MODULE__style_index_mjs__.useToken)();
    const style = {};
    if (designable) style['backgroundColor'] = 'var(--colorSettings)';
    (0, __WEBPACK_EXTERNAL_MODULE_react_hotkeys_hook__.useHotkeys)('Ctrl+Shift+U', ()=>setDesignable(!designable), [
        designable
    ]);
    return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd__.Tooltip, {
        title: t('UI Editor'),
        children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd__.Button, {
            "data-testid": 'ui-editor-button',
            icon: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__icon_index_mjs__.Icon, {
                type: "Design",
                style: {
                    color: token.colorTextHeaderMenu,
                    fill: token.colorTextHeaderMenu
                }
            }),
            title: t('UI Editor'),
            style: style,
            onClick: ()=>{
                setDesignable(!designable);
            }
        })
    });
};
export { DesignableSwitch };
