import { jsx } from "react/jsx-runtime";
import "react";
import { Plugin } from "../../application/Plugin.mjs";
import { ExtendCollectionsProvider } from "../../data-source/index.mjs";
class PluginBuiltInCollections extends Plugin {
    async load() {
        this.app.use(BuiltInCollectionsProvider);
    }
}
const collection = {
    name: 'test-test',
    title: 'TestTest',
    fields: [
        {
            type: 'string',
            name: 'name',
            interface: 'input',
            uiSchema: {
                title: 'Name',
                type: 'string',
                'x-component': 'Input',
                required: true
            }
        },
        {
            type: 'boolean',
            name: 'enabled',
            interface: 'radioGroup',
            uiSchema: {
                title: 'Enabled',
                type: 'string',
                required: true,
                enum: [
                    {
                        label: 'On',
                        value: true
                    },
                    {
                        label: 'Off',
                        value: false
                    }
                ],
                'x-component': 'Radio.Group',
                'x-decorator': 'FormItem',
                default: false
            }
        }
    ]
};
const BuiltInCollectionsProvider = (param)=>{
    let { children } = param;
    return /*#__PURE__*/ jsx(ExtendCollectionsProvider, {
        collections: [
            collection
        ],
        children: children
    });
};
export { PluginBuiltInCollections, collection };
