import { ChangeDetectionStrategy, Component, OnInit, TemplateRef, ViewChild } from '@angular/core';

@Component({
    selector: 'redaction-dossier-skeleton',
    templateUrl: './dossier-skeleton.component.html',
    styleUrls: ['./dossier-skeleton.component.scss'],
    changeDetection: ChangeDetectionStrategy.OnPush,
})
export class DossierSkeletonComponent implements OnInit {
    @ViewChild('workload1', { static: true }) workload1: TemplateRef<unknown>;
    @ViewChild('workload2', { static: true }) workload2: TemplateRef<unknown>;
    @ViewChild('workload3', { static: true }) workload3: TemplateRef<unknown>;
    @ViewChild('workload4', { static: true }) workload4: TemplateRef<unknown>;
    @ViewChild('workload5', { static: true }) workload5: TemplateRef<unknown>;
    @ViewChild('workload6', { static: true }) workload6: TemplateRef<unknown>;

    workloadTemplates: TemplateRef<unknown>[];

    ngOnInit(): void {
        this.workloadTemplates = [
            this.workload1,
            this.workload3,
            this.workload2,
            this.workload3,
            this.workload4,
            this.workload5,
            this.workload1,
            this.workload5,
            this.workload6,
            this.workload6,
            this.workload2,
            this.workload5,
        ];
    }
}
