import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime";
import "react";
import * as __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__ from "@tachybase/test/client";
import * as __WEBPACK_EXTERNAL_MODULE__appInfo_mjs__ from "../../../../../../../../../appInfo.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__schema_component_antd_checkbox_index_mjs__ from "../../../schema-component/antd/checkbox/index.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__schema_component_antd_input_index_mjs__ from "../../../schema-component/antd/input/index.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__schema_component_core_SchemaComponent_mjs__ from "../../../schema-component/core/SchemaComponent.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__schema_component_core_SchemaComponentProvider_mjs__ from "../../../schema-component/core/SchemaComponentProvider.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__json_mjs__ from "../json.mjs";
const Component = ()=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__schema_component_core_SchemaComponentProvider_mjs__.SchemaComponentProvider, {
        components: {
            Input: __WEBPACK_EXTERNAL_MODULE__schema_component_antd_input_index_mjs__.Input,
            Checkbox: __WEBPACK_EXTERNAL_MODULE__schema_component_antd_checkbox_index_mjs__.Checkbox
        },
        children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__schema_component_core_SchemaComponent_mjs__.SchemaComponent, {
            schema: __WEBPACK_EXTERNAL_MODULE__json_mjs__.json
        })
    });
describe('JSON', ()=>{
    it('should show JSONB when dialect is postgres', async ()=>{
        (0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.render)(/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(Component, {}), {
            wrapper: (param)=>{
                let { children } = param;
                return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__appInfo_mjs__.CurrentAppInfoContext.Provider, {
                    value: {
                        data: {
                            database: {
                                dialect: 'postgres'
                            }
                        }
                    },
                    children: children
                });
            }
        });
        await (0, __WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.waitFor)(()=>{
            expect(__WEBPACK_EXTERNAL_MODULE__tachybase_test_client__.screen.queryByText('JSONB')).toBeInTheDocument();
        });
    });
});
