import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime";
import * as __WEBPACK_EXTERNAL_MODULE__tachybase_schema__ from "@tachybase/schema";
import * as __WEBPACK_EXTERNAL_MODULE_antd__ from "antd";
import * as __WEBPACK_EXTERNAL_MODULE__index_mjs__ from "../../index.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__application_schema_settings_hooks_index_mjs__ from "../../../application/schema-settings/hooks/index.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__application_schema_toolbar_context_index_mjs__ from "../../../application/schema-toolbar/context/index.mjs";
const PageDesigner = (param)=>{
    let { title } = param;
    const { designable } = (0, __WEBPACK_EXTERNAL_MODULE__index_mjs__.useDesignable)();
    const fieldSchema = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.useFieldSchema)();
    const { render } = (0, __WEBPACK_EXTERNAL_MODULE__application_schema_settings_hooks_index_mjs__.useSchemaSettingsRender)(fieldSchema['x-settings'] || 'PageSettings', fieldSchema['x-settings-props']);
    if (!designable) return null;
    return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__application_schema_toolbar_context_index_mjs__.SchemaToolbarProvider, {
        title: title,
        children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("div", {
            className: 'general-schema-designer',
            children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)("div", {
                className: 'general-schema-designer-icons',
                children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd__.Space, {
                    size: 2,
                    align: 'center',
                    children: render()
                })
            })
        })
    });
};
export { PageDesigner };
