<app-btn-navigate navigate="/sam/forms-management" nameButton="Regresar" [widthPosition]="'14px'" />

<div class="menu-title prevent-select">
  <span>Gestión de adquisiciones</span>
</div>

<div class="menu-card prevent-select">

  @for (submodule of submodules; 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"> {{ submodule.NOMBRESUBMODULO }} </mat-card-title>
    </mat-card>
  }

  <app-loading-card [isLoading]="isLoading" [txtLoading]="'Cargando el menú de adquisiciones'" />

  @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>