<ion-header>
  <ion-toolbar>
    <ion-title>Airconditioning</ion-title>
  </ion-toolbar>
</ion-header>

<ion-content>
  <ion-grid>

    <ion-row justify-content-center text-center class="ac-status-row">
      <ion-col>
        <div class="ac-status">
          <h3 class="ac-heading">Current Status:</h3>
          <ion-badge class="ac-status-badge" color="danger" *ngIf="mainAirConditionerStatus == false">Powered Off</ion-badge>
          <ion-badge class="ac-status-badge" color="success" *ngIf="mainAirConditionerStatus == true">Powered On</ion-badge>
        </div>
      </ion-col>
    </ion-row>

    <ion-row>
      <ion-col>
        <div class="status">
          <ion-icon name="wifi" class="status-icon"></ion-icon><span class="status-heading">Target temperature</span>
          <p class="status-value">{{getCurrentTargetTemperature()}} °C</p>
        </div>
      </ion-col>
    </ion-row>

    <ion-row>

      <ion-col>
        <div class="status">
          <ion-icon name="thermometer" class="status-icon"></ion-icon><span class="status-heading">Current temperature</span>
          <p class="status-value">{{getCurrentTemperature()}} °C</p>
        </div>
      </ion-col>

      <ion-col>
        <div class="status">
          <ion-icon name="water" class="status-icon"></ion-icon><span class="status-heading">Current humidity</span>
          <p class="status-value">{{getCurrentHumidity()}} %</p>
        </div>
      </ion-col>

    </ion-row>

    <ion-row>

      <ion-col>
        <div class="status">
          <ion-icon name="speedometer" class="status-icon"></ion-icon><span class="status-heading">Current speed</span>
          <p class="status-value">{{getCurrentSpeed()}}</p>
        </div>
      </ion-col>

      <ion-col>
        <div class="status">
          <ion-icon name="cog" class="status-icon"></ion-icon><span class="status-heading">Current mode</span>
          <p class="status-value">{{getCurrentMode()}}</p>
        </div>
      </ion-col>

    </ion-row>

    <ion-row class="control-row">
      <div class="control-col">
        <ion-col>
          <ion-button class="control-button" (click)="switchMainAirConditioner()"><ion-icon class="control-button-icon" name="power"></ion-icon></ion-button>
        </ion-col>
  
        <ion-col>
          <ion-button class="control-button" (click)="openTargetTemperaturePicker()"><ion-icon class="control-button-icon" name="wifi"></ion-icon></ion-button>
        </ion-col>
  
        <ion-col>
          <ion-button class="control-button" (click)="setMainAirConditionerSpeed()"><ion-icon class="control-button-icon" name="speedometer"></ion-icon></ion-button>
        </ion-col>
  
        <ion-col>
          <ion-button class="control-button" (click)="openModePicker()"><ion-icon class="control-button-icon" name="cog"></ion-icon></ion-button>
        </ion-col>
      </div>
    </ion-row>

  </ion-grid>
</ion-content>
  