"use strict";
var __webpack_exports__ = {};
const external_createListBlockUISchema_js_namespaceObject = require("../createListBlockUISchema.js");
describe('createListBlockSchema', ()=>{
    test('should return the correct schema', ()=>{
        const options = {
            collectionName: 'users',
            dataSource: 'users',
            association: 'user',
            templateSchema: {
                type: 'object',
                properties: {
                    name: {
                        type: 'string'
                    },
                    age: {
                        type: 'number'
                    }
                }
            },
            rowKey: 'id'
        };
        const schema = (0, external_createListBlockUISchema_js_namespaceObject.createListBlockSchema)(options);
        expect(schema).toMatchInlineSnapshot('\n      {\n        "properties": {\n          "actionBar": {\n            "type": "void",\n            "x-component": "ActionBar",\n            "x-component-props": {\n              "style": {\n                "marginBottom": "var(--tb-spacing)",\n              },\n            },\n            "x-initializer": "list:configureActions",\n          },\n          "list": {\n            "properties": {\n              "item": {\n                "properties": {\n                  "actionBar": {\n                    "type": "void",\n                    "x-align": "left",\n                    "x-component": "ActionBar",\n                    "x-component-props": {\n                      "layout": "one-column",\n                    },\n                    "x-initializer": "list:configureItemActions",\n                    "x-use-component-props": "useListActionBarProps",\n                  },\n                  "grid": {\n                    "properties": {\n                      "age": {\n                        "type": "number",\n                      },\n                      "name": {\n                        "type": "string",\n                      },\n                    },\n                    "type": "object",\n                  },\n                },\n                "type": "object",\n                "x-component": "List.Item",\n                "x-read-pretty": true,\n                "x-use-component-props": "useListItemProps",\n              },\n            },\n            "type": "array",\n            "x-component": "List",\n            "x-use-component-props": "useListBlockProps",\n          },\n        },\n        "type": "void",\n        "x-acl-action": "user:view",\n        "x-component": "CardItem",\n        "x-decorator": "List.Decorator",\n        "x-decorator-props": {\n          "action": "list",\n          "association": "user",\n          "collection": "users",\n          "dataSource": "users",\n          "params": {\n            "pageSize": 10,\n          },\n          "readPretty": true,\n          "rowKey": "id",\n          "runWhenParamsChanged": true,\n        },\n        "x-settings": "blockSettings:list",\n        "x-toolbar": "BlockSchemaToolbar",\n        "x-use-decorator-props": "useListBlockDecoratorProps",\n      }\n    ');
    });
});
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
});
