import { genericPropertiesControlFor } from '@anglr/dynamic/layout-editor';
import { IfBlockModel } from './ifBlock.model';
/**
 * If block layout metadata
 */
export class IfBlockLayoutEditorMetadata {
    //######################### constructor #########################
    constructor() {
        //######################### public properties - implementation of LayoutEditorMetadataDescriptor #########################
        /**
         * @inheritdoc
         */
        this.metaInfo = {
            name: 'If',
            description: 'If block - conditionally displays content',
            group: 'Layout',
            optionsMetadata: {
                propertiesMetadata: [
                    {
                        modelType: IfBlockModel,
                        propertiesControls: [
                            genericPropertiesControlFor(['condition']),
                        ],
                    },
                ]
            },
            defaultOptions: {
                condition: true,
            }
        };
        /**
         * @inheritdoc
         */
        this.addDescendant = (metadata, options) => {
            options.content = metadata;
        };
        /**
         * @inheritdoc
         */
        this.canDropMetadata = options => !(options === null || options === void 0 ? void 0 : options.content);
        /**
         * @inheritdoc
         */
        this.removeDescendant = (_, options) => {
            options.content = null;
        };
        Object.freeze(this);
    }
}
//# sourceMappingURL=ifBlock.layoutMetadata.js.map