import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime";
import "react";
import * as __WEBPACK_EXTERNAL_MODULE__tachybase_client__ from "@tachybase/client";
import * as __WEBPACK_EXTERNAL_MODULE__tachybase_schema__ from "@tachybase/schema";
const Block = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.observer)(()=>{
    const fieldSchema = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.useFieldSchema)();
    return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsxs)("div", {
        className: "nc-block-item",
        style: {
            marginBottom: 20,
            padding: '0 20px',
            height: 50,
            lineHeight: '50px',
            background: '#f1f1f1'
        },
        children: [
            "Block ",
            fieldSchema.name,
            /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__tachybase_client__.DragHandler, {})
        ]
    });
}, {
    displayName: 'Block'
});
const schema = {
    type: 'void',
    name: 'page',
    'x-component': 'DndContext',
    'x-uid': (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.uid)(),
    properties: {
        block1: {
            'x-decorator': 'BlockItem',
            'x-component': 'Block',
            'x-uid': (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.uid)()
        },
        block2: {
            'x-decorator': 'BlockItem',
            'x-component': 'Block',
            'x-uid': (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.uid)()
        },
        block3: {
            'x-decorator': 'BlockItem',
            'x-component': 'Block',
            'x-uid': (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.uid)()
        }
    }
};
function App() {
    return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__tachybase_client__.SchemaComponentProvider, {
        components: {
            DndContext: __WEBPACK_EXTERNAL_MODULE__tachybase_client__.DndContext,
            BlockItem: __WEBPACK_EXTERNAL_MODULE__tachybase_client__.BlockItem,
            Block
        },
        children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__tachybase_client__.SchemaComponent, {
            schema: schema
        })
    });
}
export { App as default };
