import { observer } from 'mobx-react';
import { SelectionManager } from '../util/SelectionManager';
import './ComponentDecorations.scss';
import * as React from 'react';

@observer
export class ComponentDecorations extends React.Component<{ boundsTop: number; boundsLeft: number }, { value: string }> {
    static Instance: ComponentDecorations;

    render() {
        const seldoc = SelectionManager.Views.lastElement();
        return seldoc?.ComponentView?.componentUI?.(this.props.boundsLeft, this.props.boundsTop) ?? null;
    }
}
