"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: ()=>demo4_rslib_entry_
});
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
require("react");
const client_namespaceObject = require("@tachybase/client");
const schema = {
    type: 'object',
    properties: {
        block1: {
            type: 'void',
            'x-decorator': 'CollectionProvider_deprecated',
            'x-decorator-props': {
                name: 'posts'
            },
            properties: {
                createdBy: {
                    'x-component': 'CollectionField',
                    'x-read-pretty': true,
                    properties: {
                        rowSelection: {
                            'x-component': 'RowSelection',
                            'x-component-props': {
                                rowKey: 'id',
                                objectValue: true,
                                rowSelection: {
                                    type: 'checkbox'
                                },
                                dataSource: [
                                    {
                                        id: 1,
                                        name: 'Name1'
                                    },
                                    {
                                        id: 2,
                                        name: 'Name2'
                                    },
                                    {
                                        id: 3,
                                        name: 'Name3'
                                    }
                                ]
                            },
                            properties: {
                                column1: {
                                    type: 'void',
                                    title: 'Name',
                                    'x-component': 'RowSelection.Column',
                                    properties: {
                                        name: {
                                            type: 'string',
                                            'x-component': 'Input',
                                            'x-read-pretty': true
                                        }
                                    }
                                }
                            }
                        },
                        item: {
                            'x-component': 'RecordPicker.SelectedItem',
                            properties: {
                                drawer1: {
                                    'x-component': 'Action.Drawer',
                                    type: 'void',
                                    title: 'Drawer Title',
                                    properties: {
                                        hello1: {
                                            'x-content': 'Hello',
                                            title: 'T1'
                                        },
                                        footer1: {
                                            'x-component': 'Action.Drawer.Footer',
                                            type: 'void',
                                            properties: {
                                                close1: {
                                                    type: 'void',
                                                    title: 'Close',
                                                    'x-component': 'Action',
                                                    'x-component-props': {}
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
};
const collections = [
    {
        name: 'posts',
        fields: [
            {
                type: 'integer',
                name: 'id',
                interface: 'input',
                uiSchema: {
                    title: 'ID1',
                    type: 'number',
                    'x-component': 'InputNumber',
                    required: true,
                    description: 'description1'
                }
            },
            {
                type: 'string',
                name: 'name',
                interface: 'input',
                uiSchema: {
                    title: 'Name1',
                    type: 'string',
                    'x-component': 'Input',
                    required: true,
                    description: 'description1'
                }
            },
            {
                type: 'string',
                name: 'date',
                interface: 'datetime',
                uiSchema: {
                    type: 'boolean',
                    title: "Date1",
                    'x-read-pretty': true,
                    'x-decorator': 'FormItem',
                    'x-component': 'DatePicker',
                    'x-component-props': {
                        dateFormat: 'YYYY/MM/DD'
                    }
                }
            },
            {
                type: 'belongsToMany',
                name: 'createdBy',
                target: 'users',
                foreignKey: 'createdById',
                uiSchema: {
                    type: 'array',
                    title: "创建人",
                    default: [
                        {
                            id: 1,
                            name: 'name1'
                        },
                        {
                            id: 2,
                            name: 'name2'
                        }
                    ],
                    'x-decorator': 'FormItem',
                    'x-component': 'RecordPicker'
                }
            }
        ]
    }
];
const demo4_rslib_entry_ = ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(client_namespaceObject.SchemaComponentProvider, {
        children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(client_namespaceObject.AntdSchemaComponentProvider, {
            children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(client_namespaceObject.ExtendCollectionsProvider, {
                collections: collections,
                children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(client_namespaceObject.SchemaComponent, {
                    schema: schema
                })
            })
        })
    });
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
});
