import * as React from "react";
import { FormView as CoreFormView } from "../Controls/FormView";
import { FormView as CorrespondenceFormView } from "./Correspondence/FormView";
import { FormView as TaskFormView } from "./Task/FormView";
import { FormView as MeetingTemplateFormView } from "./MeetingTemplate/FormView";
import { FormView as MeetingFormView } from "./Meeting/FormView";
import { FormView as MeetingRoomFormView } from "./MeetingRoom/FormView";

export class FormView extends React.Component<any, any> {
    // private fieldsControl: FieldsControl;
    constructor(props: any) {
        super(props);
    }

    public render(): JSX.Element {
        return (
            this.props.Record.entityId == 14 ?
                <CorrespondenceFormView  {...this.props}></CorrespondenceFormView> :
                (
                    this.props.Record.entityId == 24 ?
                        <TaskFormView  {...this.props}></TaskFormView> :
                        (
                            this.props.Record.entityId == 32 ?
                                <MeetingTemplateFormView  {...this.props}></MeetingTemplateFormView> :
                                (
                                    this.props.Record.entityId == 33 ?
                                        <MeetingFormView  {...this.props}></MeetingFormView> :
                                        (
                                            this.props.Record.entityId == 36 ?
                                                <MeetingRoomFormView  {...this.props}></MeetingRoomFormView> :
                                                <CoreFormView  {...this.props}></CoreFormView>))))
        );
    }
}