import * as __WEBPACK_EXTERNAL_MODULE__createGridCardBlockUISchema_mjs__ from "../createGridCardBlockUISchema.mjs";
describe('createGridCardBlockSchema', ()=>{
    test('should return the correct schema', ()=>{
        const options = {
            collectionName: 'testCollection',
            dataSource: 'testDataSource',
            association: 'testAssociation',
            templateSchema: {
                type: 'string'
            },
            rowKey: 'testRowKey'
        };
        const schema = (0, __WEBPACK_EXTERNAL_MODULE__createGridCardBlockUISchema_mjs__.createGridCardBlockSchema)(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": "gridCard: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": "gridCard:configureItemActions",\n                    "x-use-component-props": "useGridCardActionBarProps",\n                  },\n                  "grid": {\n                    "type": "string",\n                  },\n                },\n                "type": "object",\n                "x-component": "GridCard.Item",\n                "x-read-pretty": true,\n                "x-use-component-props": "useGridCardItemProps",\n              },\n            },\n            "type": "array",\n            "x-component": "GridCard",\n            "x-use-component-props": "useGridCardBlockProps",\n          },\n        },\n        "type": "void",\n        "x-acl-action": "testAssociation:view",\n        "x-component": "BlockItem",\n        "x-decorator": "GridCard.Decorator",\n        "x-decorator-props": {\n          "action": "list",\n          "association": "testAssociation",\n          "collection": "testCollection",\n          "dataSource": "testDataSource",\n          "params": {\n            "pageSize": 12,\n          },\n          "readPretty": true,\n          "rowKey": "testRowKey",\n          "runWhenParamsChanged": true,\n        },\n        "x-settings": "blockSettings:gridCard",\n        "x-toolbar": "BlockSchemaToolbar",\n        "x-use-component-props": "useGridCardBlockItemProps",\n        "x-use-decorator-props": "useGridCardBlockDecoratorProps",\n      }\n    ');
    });
    test('should return the correct schema when templateSchema is empty', ()=>{
        const options = {
            collectionName: 'testCollection',
            dataSource: 'testDataSource',
            association: 'testAssociation',
            rowKey: 'testRowKey'
        };
        const schema = (0, __WEBPACK_EXTERNAL_MODULE__createGridCardBlockUISchema_mjs__.createGridCardBlockSchema)(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": "gridCard: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": "gridCard:configureItemActions",\n                    "x-use-component-props": "useGridCardActionBarProps",\n                  },\n                  "grid": {\n                    "type": "void",\n                    "x-component": "Grid",\n                    "x-initializer": "details:configureFields",\n                  },\n                },\n                "type": "object",\n                "x-component": "GridCard.Item",\n                "x-read-pretty": true,\n                "x-use-component-props": "useGridCardItemProps",\n              },\n            },\n            "type": "array",\n            "x-component": "GridCard",\n            "x-use-component-props": "useGridCardBlockProps",\n          },\n        },\n        "type": "void",\n        "x-acl-action": "testAssociation:view",\n        "x-component": "BlockItem",\n        "x-decorator": "GridCard.Decorator",\n        "x-decorator-props": {\n          "action": "list",\n          "association": "testAssociation",\n          "collection": "testCollection",\n          "dataSource": "testDataSource",\n          "params": {\n            "pageSize": 12,\n          },\n          "readPretty": true,\n          "rowKey": "testRowKey",\n          "runWhenParamsChanged": true,\n        },\n        "x-settings": "blockSettings:gridCard",\n        "x-toolbar": "BlockSchemaToolbar",\n        "x-use-component-props": "useGridCardBlockItemProps",\n        "x-use-decorator-props": "useGridCardBlockDecoratorProps",\n      }\n    ');
    });
});
