import { ComponentStylingModel, ComponentStylingPropertiesControlComponent } from '@anglr/dynamic/layout-editor';
import { MaterialTabModel } from './tab.model';
/**
 * Material expansion panel layout metadata
 */
export class MaterialTabLayoutEditorMetadata {
    //######################### constructor #########################
    constructor() {
        //######################### public properties - implementation of LayoutEditorMetadataDescriptor #########################
        /**
         * @inheritdoc
         */
        this.metaInfo = {
            name: 'Tabs',
            description: 'Material tabs',
            group: 'Material',
            optionsMetadata: {
                propertiesMetadata: [
                    {
                        modelType: ComponentStylingModel,
                        propertiesControls: [
                            ComponentStylingPropertiesControlComponent,
                        ],
                    },
                    {
                        modelType: MaterialTabModel,
                        propertiesControls: [
                        // genericPropertiesControlFor<MaterialExpansionPanelModel>(['title', 'description', 'expanded'])
                        ],
                    },
                ]
            }
        };
        /**
         * @inheritdoc
         */
        this.addDescendant = (metadata, options, index) => {
            options.children ?? (options.children = []);
            options.children.splice(index, 0, metadata);
        };
        /**
         * @inheritdoc
         */
        this.canDropMetadata = () => true;
        /**
         * @inheritdoc
         */
        this.getChildrenContainer = element => element.querySelector('.mat-expansion-panel-body');
        /**
         * @inheritdoc
         */
        this.removeDescendant = (id, options) => {
            options.children ?? (options.children = []);
            const index = options.children.findIndex(itm => itm.id === id);
            options.children.splice(index, 1);
        };
        Object.freeze(this);
    }
}
//# sourceMappingURL=tab.layoutMetadata.js.map