"use strict";
var __webpack_exports__ = {};
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
require("react");
const client_namespaceObject = require("@tachybase/client");
const test_client_namespaceObject = require("@tachybase/test/client");
function renderApp(name, designable) {
    const schema = {
        name: 'root',
        type: 'void',
        'x-component': 'CollectionDeletedPlaceholder',
        'x-component-props': {
            name,
            type: 'Collection'
        }
    };
    (0, test_client_namespaceObject.render)(/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
        "data-testid": "app",
        children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(client_namespaceObject.SchemaComponentProvider, {
            designable: designable,
            children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(client_namespaceObject.SchemaComponent, {
                schema: schema,
                components: {
                    CollectionDeletedPlaceholder: client_namespaceObject.CollectionDeletedPlaceholder
                }
            })
        })
    }));
}
describe('CollectionDeletedPlaceholder', ()=>{
    test('name is undefined, render `Result` component', ()=>{
        renderApp(void 0, true);
        expect(document.body.innerHTML).toContain('ant-result');
    });
    describe('name exist', ()=>{
        test('designable: true, render `Result` component', ()=>{
            renderApp('test', true);
            expect(document.body.innerHTML).toContain('ant-result');
        });
        test('designable: false, render nothing', ()=>{
            renderApp('test', false);
            expect(test_client_namespaceObject.screen.getByTestId('app').innerHTML.length).toBe(0);
        });
    });
});
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
});
