<div class="page">
  <div class="page-main">
    <app-admin-menu [data]="profileData" appHoverEffectSidebar></app-admin-menu>
    <div class="app-content main-content">
      <div class="side-app">
        <app-admin-header [profileData]="profileData"></app-admin-header>
        @if (setting?.MAINTENANCE_MODE == 'on') {
          <div class="alert alert-danger sprukoclosebtn mt-5 fs-15">
            <i class="fa fa-hourglass-half fa-spin me-2 fs-15" aria-hidden="true"></i>
            {{ 'This application is in maintenance mode. We are performing scheduled maintenance.' | translate }}
          </div>
        }
        @if ((setting?.newUpdate == 1) && (AuthId == 1)) {
          <div class="alert alert-info sprukoclosebtn mt-5 fs-15">
            <i class="fa fa-exclamation-triangle me-2 fs-18" aria-hidden="true"></i>
            {{ 'A new version is available; make sure to update it to access the latest features.' | translate }}
          </div>
        }
        @if (setting?.mail_host == 'smtp.mailtrap.io' && profileData && profileData.users?.roles?.[0]?.name == 'superadmin') {
          <div class="alert alert-warning sprukoclosebtn mt-5 fs-15">
            <i class="fa fa-exclamation-triangle me-2 fs-18" aria-hidden="true"></i>
            {{ 'It is necessary to set up your email settings first in order to send and receive emails.' | translate }}
            <div class="">
              <a routerLink="/admin/app-setting/email-setting" class="btn btn-dark btn-sm mt-2 mx-2"> <i
              class="fa fa-cogs me-2 fs-15" aria-hidden="true"></i>{{'Email Setup' | translate}} </a>
              <a routerLink="/admin/app-setting/email-setting" class="btn btn-dark btn-sm mt-2"> <i
              class="fa fa-link me-2 fs-15" aria-hidden="true"></i>{{'Setup Reference' | translate}}</a>
            </div>
          </div>
        }

        @if (profileData && profileData.cronworking != true && profileData.users?.roles?.[0]?.name == 'superadmin') {
          <div class="alert alert-info sprukoclosebtn mt-5 fs-15">
            <i class="fa fa-exclamation-triangle me-2 fs-18" aria-hidden="true"></i>
            {{ 'It is necessary to set up your cron job first in order for the auto functions to work.' | translate }}
            <div class="">
              <a href="https://youtu.be/uqkZsQdU_TE" class="btn btn-dark btn-sm mt-2" target="_blank"> <i
              class="fa fa-link me-2 fs-15" aria-hidden="true"></i>{{'Setup Reference' | translate}} </a>
            </div>
          </div>
        }
        <router-outlet>
        </router-outlet>
      </div>
    </div>
  </div>
  <app-footer [profileData]="profileData"></app-footer>
</div>
<app-back-to-top></app-back-to-top>