import * as __WEBPACK_EXTERNAL_MODULE__tachybase_schema__ from "@tachybase/schema";
const createFilterFormBlockSchema = (options)=>{
    const { collectionName, dataSource, templateSchema } = options;
    if (!collectionName || !dataSource) throw new Error('collectionName and dataSource are required');
    const schema = {
        type: 'void',
        'x-decorator': 'FilterFormBlockProvider',
        'x-use-decorator-props': 'useFilterFormBlockDecoratorProps',
        'x-decorator-props': {
            dataSource,
            collection: collectionName
        },
        'x-toolbar': 'BlockSchemaToolbar',
        'x-settings': 'blockSettings:filterForm',
        'x-component': 'CardItem',
        'x-filter-targets': [],
        'x-filter-operators': {},
        properties: {
            [(0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.uid)()]: {
                type: 'void',
                'x-component': 'FormV2',
                'x-use-component-props': 'useFilterFormBlockProps',
                properties: {
                    grid: templateSchema || {
                        type: 'void',
                        'x-component': 'Grid',
                        'x-initializer': 'filterForm:configureFields'
                    },
                    [(0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.uid)()]: {
                        type: 'void',
                        'x-initializer': 'filterForm:configureActions',
                        'x-component': 'ActionBar',
                        'x-component-props': {
                            layout: 'one-column',
                            style: {
                                float: 'right'
                            }
                        }
                    }
                }
            }
        }
    };
    return schema;
};
export { createFilterFormBlockSchema };
