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__testUtils_index_mjs__ from "../../../../testUtils/index.mjs";
const { apiClient, mockRequest } = (0, __WEBPACK_EXTERNAL_MODULE__testUtils_index_mjs__.mockAPIClient)();
mockRequest.onGet('/posts:list').reply(()=>[
        200,
        {
            data: [
                {
                    id: 1,
                    title: 'title1'
                },
                {
                    id: 2,
                    title: 'title2'
                }
            ]
        }
    ]);
const schema = {
    type: 'object',
    properties: {
        association: {
            type: 'array',
            'x-component': 'RemoteSelect',
            'x-component-props': {
                multiple: true,
                fieldNames: {
                    label: 'title',
                    value: 'id'
                },
                service: {
                    resource: 'posts',
                    action: 'list'
                },
                style: {
                    width: '100%'
                }
            }
        }
    }
};
const demo1_rslib_entry_ = ()=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__tachybase_client__.FormProvider, {
        children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__tachybase_client__.APIClientProvider, {
            apiClient: apiClient,
            children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__tachybase_client__.SchemaComponent, {
                components: {
                    RemoteSelect: __WEBPACK_EXTERNAL_MODULE__tachybase_client__.RemoteSelect
                },
                schema: schema
            })
        })
    });
export { demo1_rslib_entry_ as default };
