import { codePropertiesControlFor } from '@anglr/dynamic/layout-editor';
import { CssLanguageModel } from '@anglr/dynamic';
import { StyleBlockModel } from './styleBlock.model';
/**
 * Style block layout metadata
 */
export class StyleBlockLayoutEditorMetadata {
    //######################### constructor #########################
    constructor() {
        //######################### public properties - implementation of LayoutEditorMetadataDescriptor #########################
        /**
         * @inheritdoc
         */
        this.metaInfo = {
            name: 'Style',
            description: 'Style block - allows styling of content',
            group: 'Layout',
            optionsMetadata: {
                propertiesMetadata: [
                    {
                        modelType: StyleBlockModel,
                        propertiesControls: [
                            codePropertiesControlFor('style', CssLanguageModel),
                        ],
                    },
                ]
            },
        };
        /**
         * @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=styleBlock.layoutMetadata.js.map