import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime";
import "react";
import * as __WEBPACK_EXTERNAL_MODULE__tachybase_client__ from "@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, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__tachybase_client__.SchemaComponentProvider, {
        children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__tachybase_client__.AntdSchemaComponentProvider, {
            children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__tachybase_client__.ExtendCollectionsProvider, {
                collections: collections,
                children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__tachybase_client__.SchemaComponent, {
                    schema: schema
                })
            })
        })
    });
export { demo4_rslib_entry_ as default };
