import { applyGridCoordinates } from '../gridPanelCell.utils';
/**
 * Grid panel layout metadata
 */
export class GridPanelCellLayoutEditorMetadata {
    //######################### constructor #########################
    constructor() {
        //######################### public properties - implementation of LayoutEditorMetadataDescriptor #########################
        /**
         * @inheritdoc
         */
        this.metaInfo = {
            name: 'Grid cell',
            dragDisabled: true,
        };
        /**
         * @inheritdoc
         */
        this.addDescendant = (metadata, options, _index) => {
            options.component = metadata;
        };
        /**
         * @inheritdoc
         */
        this.applyDesignerStyles = applyGridCoordinates;
        /**
         * @inheritdoc
         */
        this.canDropMetadata = options => !options?.component;
        /**
         * @inheritdoc
         */
        this.removeDescendant = (id, options) => {
            if (options.component?.id === id) {
                options.component = undefined;
            }
        };
        Object.freeze(this);
    }
}
//# sourceMappingURL=gridPanelCell.layoutMetadata.js.map