<!-- Start Record View Container Section -->

<div *ngIf="(vm$ | async) as vm"
     class="record-view-container view-container container-fluid pt-3 small-font">
    <div class="row">
        <div class="col-lg-9" [ngClass]="{ 'col-lg-12': !vm.sidebarWidgetConfig.show }">

            <div class="container-fluid pl-0 pr-0">

                <div class="row no-gutters"
                     *ngIf="vm.topWidgetConfig.show && hasTopWidgetMetadata(vm.topWidgetConfig.widget)">
                    <div class="col pb-3">
                        <scrm-top-widget [type]="vm.topWidgetConfig.widget.type"
                                         [context]="getViewContext()"
                                         [config]="vm.topWidgetConfig.widget">
                        </scrm-top-widget>
                    </div>
                </div>

                <div class="row no-gutters">
                    <div class="col">
                        <scrm-record-content [dataSource]="getContentAdapter()"></scrm-record-content>
                    </div>
                </div>

                <div class="row no-gutters pt-4 pb-4">
                    <div class="col">
                        <scrm-subpanel-container [config]="getSubpanelsConfig()"></scrm-subpanel-container>
                    </div>
                </div>
            </div>
        </div>

        <div class="col-lg-3 record-widget-container pl-0"
             *ngIf="vm.sidebarWidgetConfig.show && vm.sidebarWidgetConfig.widgets">
            <div class="mb-3" *ngFor="let widget of vm.sidebarWidgetConfig.widgets">
                <scrm-sidebar-widget [type]="widget.type"
                                     [context]="getViewContext()"
                                     [config]="widget">
                </scrm-sidebar-widget>
            </div>
        </div>

    </div>
</div>

<!-- End Record View Container Section -->
