<div *ngIf="configuration?.layout">
	<!-- div class="div-table"*ngIf="this.communities.length > 1" >
		<div class="div-table-row">
			<div class="div-table-cell">{{ 'LABEL.SELECT_A_COMMUNITY' |
				translate }}</div>
			<div class="div-table-cell">
				<p-dropdown [options]="communities" [(ngModel)]="selectedCommunity"
					optionLabel="communityName"
					placeholder="{{ 'LABEL.SELECT_A_COMMUNITY' | translate }}"
					(onChange)="setCommunity($event)"> </p-dropdown>
			</div>
		</div>
	</div -->
	<div *ngIf="userService?.selectedCommunity || this.userService?.user?.usercommunities?.length === 1">
		<div class="grid m-2" *ngFor="let row of configuration?.layout?.rows">
			<div *ngFor="let column of row.columns"
				class="col col-{{column.width}}"
				[ngStyle]="column!.style ? column!.style : {}">
				<div *ngFor="let widget of column.widgets">
					<chart-widget *ngIf="'CHART' == widget.type" [widget]="widget"></chart-widget>
					<text-widget *ngIf="'TEXT' == widget.type" [widget]="widget"></text-widget>
					<table-widget *ngIf="'TABLE' == widget.type" [widget]="widget"></table-widget>
					<image-widget *ngIf="'IMAGE' == widget.type" [widget]="widget"></image-widget>
				</div>
			</div>
		</div>
	</div>
</div>
<div *ngIf="loaded && !configuration?.layout" class="mx-3 md:mx-8 md:px-8 mt-5">
    <p-message severity="warn" text="{{ 'PAGE.NOT_CONFIGURED' | translate }}" styleClass="p-3 w-12"></p-message>
</div>