import * as React from "react";
import {Flmngr, FlmngrOpenParams} from "flmngr";


export class FlmngrPanel extends React.Component<FlmngrOpenParams, {}> {

    private containerRef: React.RefObject<HTMLDivElement>;

    constructor(props: FlmngrOpenParams) {
        super(props);
        this.containerRef = React.createRef();
    }

    componentDidMount() {
        if (this.containerRef.current) {
            Flmngr.mount(this.containerRef.current, this.props);
        }
    }

    render() {
        return <div style={{width:"100%", height: "100%"}} ref={this.containerRef}></div>;
    }


}