<div id="community-edit-form " class=" uk-card uk-card-default uk-padding">
  <div class="uk-text-large uk-text-center uk-width-5-6@l uk-width ">Edit community layout</div>
    <div>
      <div *ngIf="showLoading" class="uk-animation-fade uk-width-1-1" role="alert"><span class="loading-gif uk-align-center"></span></div>
        <table *ngIf="communityId != null && layout !== null && !showLoading && !errorMessage" class="uk-width-1-1">
          <tbody class="uk-table uk-align-center">
              <tr>
                  <td for="color" class="uk-text-bold uk-width-1-3@xl uk-width-1-3@m uk-width-expand@s uk-text-right">Color:</td>
                  <td class="uk-text-left uk-width-1-3@xl uk-width-1-3@m uk-width-expand@s">
                      <button [(colorPicker)]="layout.color" [style.background]="layout.color"
                              id="color" class="uk-icon-button"
                              (click)="change()">
                      </button>
                  </td>
                  <td for="color" class="uk-text uk-width-1-3@xl uk-width-1-3@m uk-width-expand@s uk-text-left" [style.color]="layout.color">Change your community color</td>
              </tr>
            </tbody>
          </table>
          <div *ngIf="errorMessage" class="uk-alert uk-alert-danger" role="alert">{{errorMessage}}</div>
          <div *ngIf="successfulSaveMessage" class="uk-alert uk-alert-success" role="alert">{{successfulSaveMessage}}</div>
          <div *ngIf="successfulResetMessage" class="uk-alert uk-alert-warning" role="alert">{{successfulResetMessage}}</div>

          <table *ngIf="communityId != null && layout != null && !showLoading && !errorMessage" class="uk-width-1-1">
            <tbody class="uk-table uk-align-center">
              <tr>
                <td class="uk-width-1-3@xl uk-width-1-3@m uk-width-expand@s uk-text-right"></td>
                <td class="uk-text-left">
                    <div class="uk-grid-margin uk-first-column uk-align-center uk-text-left uk-padding uk-padding-remove-top uk-padding-remove-bottom">
                        <button *ngIf="hasChanged" class="uk-button uk-button-primary" (click)="updateLayout()">Save</button>
                        <button *ngIf="!hasChanged" class="uk-button uk-button-default" disabled>Save</button>
                        <button class="uk-button" (click)="resetLayout()">Reset</button>
                        <button class="uk-button connect-default-button" (click)="loadDefaultLayout()">Default Layout</button>
                    </div>
                </td>
              </tr>
          </tbody>
        </table>
  </div>
</div>
