<div *ngFor="let entry of tocentries; index as idx">
	<!-- check if is visible -->
	<ng-container *ngIf="!hiddenEntries.includes(entry.id)">

		<!-- Is fieldset and has no visible inputs -->
		<ng-container *ngIf="!(entry.type === tocEntryTypeEnum.FieldSet && !visibilityRulesService.scanIfChildsOfCompositeFieldHasVisibleItems(entry.form))">

			<span class="table-entry" 
			(click)="toggleExpand(idx);navigateToFieldSet(entry, $event); onEntrySelected(entry)"
			[ngStyle]="calculateStyle(entry)"
			[ngClass]="calculateClass(entry)"
			>
				<span [class.text-danger]="showErrors && entry.form.invalid && ( entry.type === tocEntryTypeEnum.FieldSet   || (entry.type !== tocEntryTypeEnum.FieldSet && !expandChildren[idx])) && invalidChildsVisible(entry) ">
					{{entry.numbering}}. {{entry.label}} 
				</span>
				<!-- <mat-icon style="transform: translateY(3px);" class="text-danger"
				*ngIf="showErrors && entry.form.invalid && entry.type !== tocEntryTypeEnum.FieldSet && !expandChildren[idx]">
					priority_high
				</mat-icon> -->
				<!-- <ng-container *ngIf="entry.subEntries && entry.subEntries.length && !expandChildren[idx]"> 
					<small>
						({{entry.subEntries.length}})
					</small>	
					
				</ng-container> -->
			</span>
			<!-- <div class="table-entry-container">
			</div> -->
			<div class="internal-table">
				<table-of-contents-internal 
				[tocentries]="entry.subEntries" 
				*ngIf="entry.subEntries && entry.subEntries.length && expandChildren[idx]"
				(entrySelected)="onEntrySelected($event)"
				[selected]="selected"
				[TOCENTRY_ID_PREFIX]="TOCENTRY_ID_PREFIX"
				[showErrors]="showErrors"
				[hiddenEntries]="hiddenEntries"
				[visibilityRulesService]="visibilityRulesService"
				>
		
				</table-of-contents-internal>
			</div>
		</ng-container>



	</ng-container>

</div>