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 === null || options === void 0 ? void 0 : options.component);
        /**
         * @inheritdoc
         */
        this.removeDescendant = (id, options) => {
            var _a;
            if (((_a = options.component) === null || _a === void 0 ? void 0 : _a.id) === id) {
                options.component = undefined;
            }
        };
        Object.freeze(this);
    }
}
//# sourceMappingURL=gridPanelCell.layoutMetadata.js.map