"use strict";
var __webpack_require__ = {};
(()=>{
    __webpack_require__.d = function(exports1, definition) {
        for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
            enumerable: true,
            get: definition[key]
        });
    };
})();
(()=>{
    __webpack_require__.o = function(obj, prop) {
        return Object.prototype.hasOwnProperty.call(obj, prop);
    };
})();
(()=>{
    __webpack_require__.r = function(exports1) {
        if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
            value: 'Module'
        });
        Object.defineProperty(exports1, '__esModule', {
            value: true
        });
    };
})();
var __webpack_exports__ = {};
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
    default: ()=>demo1_rslib_entry_
});
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
require("react");
const client_namespaceObject = require("@tachybase/client");
const schema_namespaceObject = require("@tachybase/schema");
const Block = (0, schema_namespaceObject.observer)((props)=>{
    const fieldSchema = (0, schema_namespaceObject.useFieldSchema)();
    return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
        className: "block-item",
        style: {
            marginBottom: 20,
            padding: '0 20px',
            height: 50,
            lineHeight: '50px',
            background: '#f1f1f1'
        },
        children: [
            "Block ",
            fieldSchema.title,
            /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(client_namespaceObject.DragHandler, {})
        ]
    });
}, {
    displayName: 'Block'
});
const schema = {
    _isJSONSchemaObject: true,
    version: '2.0',
    type: 'void',
    name: 'grid1',
    'x-component': 'Grid',
    properties: {
        row1: {
            type: 'void',
            'x-component': 'Grid.Row',
            properties: {
                col11: {
                    _isJSONSchemaObject: true,
                    version: '2.0',
                    type: 'void',
                    'x-component': 'Grid.Col',
                    properties: {
                        block1: {
                            _isJSONSchemaObject: true,
                            version: '2.0',
                            type: 'void',
                            title: '1',
                            'x-decorator': 'BlockItem',
                            'x-component': 'Block',
                            'x-uid': 'a9m97uffyku',
                            'x-async': false,
                            'x-index': 1
                        },
                        block2: {
                            _isJSONSchemaObject: true,
                            version: '2.0',
                            type: 'void',
                            title: '2.1',
                            'x-decorator': 'BlockItem',
                            'x-component': 'Block',
                            'x-uid': 'lensw462z8w',
                            'x-async': false,
                            'x-index': 2
                        },
                        block234: {
                            _isJSONSchemaObject: true,
                            version: '2.0',
                            type: 'void',
                            title: '2.2',
                            'x-decorator': 'BlockItem',
                            'x-component': 'Block',
                            'x-uid': 'lensw462z81',
                            'x-async': false,
                            'x-index': 3
                        }
                    },
                    'x-uid': '4shevom50rl',
                    'x-async': false,
                    'x-index': 1
                },
                col12: {
                    _isJSONSchemaObject: true,
                    version: '2.0',
                    type: 'void',
                    'x-component': 'Grid.Col',
                    properties: {
                        block3: {
                            _isJSONSchemaObject: true,
                            version: '2.0',
                            type: 'void',
                            title: '3',
                            'x-decorator': 'BlockItem',
                            'x-component': 'Block',
                            'x-uid': 'kp4kjknbs2l',
                            'x-async': false,
                            'x-index': 1
                        }
                    },
                    'x-uid': 'u7n3beze0gr',
                    'x-async': false,
                    'x-index': 2
                }
            },
            'x-uid': 'qfl04eq71tt',
            'x-async': false,
            'x-index': 1
        },
        row2: {
            _isJSONSchemaObject: true,
            version: '2.0',
            type: 'void',
            'x-component': 'Grid.Row',
            properties: {
                col21: {
                    _isJSONSchemaObject: true,
                    version: '2.0',
                    type: 'void',
                    'x-component': 'Grid.Col',
                    properties: {
                        block4: {
                            _isJSONSchemaObject: true,
                            version: '2.0',
                            type: 'void',
                            title: '4',
                            'x-decorator': 'BlockItem',
                            'x-component': 'Block',
                            'x-uid': 'v5bd5kcyhat',
                            'x-async': false,
                            'x-index': 1
                        }
                    },
                    'x-uid': 'bwg0mv89atk',
                    'x-async': false,
                    'x-index': 1
                },
                col22: {
                    _isJSONSchemaObject: true,
                    version: '2.0',
                    type: 'void',
                    'x-component': 'Grid.Col',
                    properties: {
                        block5: {
                            _isJSONSchemaObject: true,
                            version: '2.0',
                            type: 'void',
                            title: '5',
                            'x-decorator': 'BlockItem',
                            'x-component': 'Block',
                            'x-uid': 'noh1flz5oqg',
                            'x-async': false,
                            'x-index': 1
                        }
                    },
                    'x-uid': 'oz0rypr2rlj',
                    'x-async': false,
                    'x-index': 2
                }
            },
            'x-uid': '5igqpmvilz1',
            'x-async': false,
            'x-index': 2
        }
    }
};
const Root = ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(client_namespaceObject.SchemaComponentProvider, {
        components: {
            Grid: client_namespaceObject.Grid,
            Block,
            BlockItem: client_namespaceObject.BlockItem
        },
        children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(client_namespaceObject.SchemaComponent, {
            schema: schema
        })
    });
class MyPlugin extends client_namespaceObject.Plugin {
    async load() {
        this.app.router.add('root', {
            path: '/',
            Component: Root
        });
    }
}
const app = new client_namespaceObject.Application({
    router: {
        type: 'memory',
        initialEntries: [
            '/'
        ]
    },
    plugins: [
        MyPlugin
    ]
});
const demo1_rslib_entry_ = app.getRootComponent();
var __webpack_export_target__ = exports;
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
    value: true
});
