<app-btn-navigate [navigate]="'/sam/home'" [nameButton]="interService.get('regresar')" [widthPosition]="'14px'" [changeLanguage]="true" />

<div class="menu-title">
  <span>{{ interService.get('S002V01M03GEPR') }}</span>
</div>

<div class="menu-card">

  @for (submodule of arrSubmodules; track submodule) {
    <mat-card class="animated fadeIn fast centre menu-card-item" (click)="openMenu(submodule)">

      @if (submodule.IMAGENSUBMODULO !== null) {
        <img mat-card-md-image [src]="'assets/img/'+submodule.IMAGENSUBMODULO+'.svg'">
      } @else {
        <mat-card-content class="p-32">
          <mat-icon>{{ submodule.ICONOSUBMODULO }}</mat-icon>
        </mat-card-content>
      }
      <mat-card-title class="fz-15"> {{ interService.get(submodule.IDSUBMODULO) }} </mat-card-title>
    </mat-card>
  }

  <app-loading-card [isLoading]="isLoading" [txtLoading]="interService.get('cargando_menu')" />

  @if (!isLoading && hasError) {
    <div class="error-container">
      <mat-icon class="icon-error">error</mat-icon>
      <h1 class="color-error">¡Error!</h1>
      <p class="p-error">{{ errorStr }}</p>
    </div>
  }

</div>
