<div class="container">
  <mat-tab-group
    mat-stretch-tabs
    animationDuration="0ms"
    (selectedTabChange)="onSelectedTabChange($event)"
    class="global-menu"
  >
    <mat-tab [aria-label]="MainMenu.Group">
      <ng-template mat-tab-label>
        <!--<mat-icon>group</mat-icon>-->
        <div
          class="icon-item"
          matTooltip="{{ 'group.label' | translate }}"
          matTooltipPosition="after"
        >
          <svg
            xmlns="http://www.w3.org/2000/svg"
            width="24"
            height="24"
            viewBox="0 0 24 24"
            fill="none"
            stroke="currentColor"
            stroke-width="1.5"
            stroke-linecap="butt"
            stroke-linejoin="round"
          >
            <path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path>
            <circle cx="12" cy="7" r="4"></circle>
          </svg>
        </div>
      </ng-template>
    </mat-tab>
    <mat-tab [aria-label]="MainMenu.Chat">
      <ng-template mat-tab-label>
        <div
          class="icon-item"
          [matBadgeHidden]="badgeChatUnReadCount <= 0"
          [matBadge]="badgeChatUnReadCount"
          matBadgeDescription="{{
            'chat.badgeDescriptionForUnread' | translate
          }}"
          matBadgeColor="accent"
          matBadgePosition="above after"
          matTooltip="{{ 'chat.label' | translate }}"
          matTooltipPosition="after"
        >
          <svg
            xmlns="http://www.w3.org/2000/svg"
            width="24"
            height="24"
            viewBox="0 0 24 24"
            fill="none"
            stroke="#000000"
            stroke-width="1.5"
            stroke-linecap="butt"
            stroke-linejoin="bevel"
          >
            <path
              d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"
            ></path>
          </svg>
        </div>
      </ng-template>
    </mat-tab>
    <mat-tab [aria-label]="MainMenu.Organization">
      <ng-template mat-tab-label>
        <!--<mat-icon>device_hub</mat-icon>-->
        <div
          class="icon-item"
          matTooltip="{{ 'organization.chart' | translate }}"
          matTooltipPosition="after"
        >
          <svg
            xmlns="http://www.w3.org/2000/svg"
            width="24"
            height="24"
            viewBox="0 0 24 24"
            fill="none"
            stroke="#000000"
            stroke-width="1.5"
            stroke-linecap="butt"
            stroke-linejoin="bevel"
          >
            <circle class="st0" cx="18.4" cy="18.5" r="3" />
            <circle class="st0" cx="12" cy="5" r="3" />
            <path class="st0" d="M12.4,10.5h4c1.1,0,2,0.9,2,2v3" />
            <circle class="st0" cx="6.1" cy="18.5" r="3" />
            <path class="st0" d="M6.1,15.5v-3c0-1.1,0.9-2,2-2h4" />
            <line class="st0" x1="12" y1="8" x2="12" y2="9" />
          </svg>
        </div>
      </ng-template>
    </mat-tab>

    <mat-tab [aria-label]="MainMenu.Message">
      <ng-template mat-tab-label>
        <!--<mat-icon>device_hub</mat-icon>-->
        <div
          class="icon-item"
          [matBadgeHidden]="(badgeMessageUnReadCount$ | async) <= 0"
          [matBadge]="badgeMessageUnReadCount$ | async"
          matBadgeDescription="{{
            'message.badgeDescriptionForUnread' | translate
          }}"
          matBadgeColor="accent"
          matBadgePosition="above after"
          matTooltip="{{ 'message.label' | translate }}"
          matTooltipPosition="after"
        >
          <svg
            xmlns="http://www.w3.org/2000/svg"
            width="24"
            height="24"
            viewBox="0 0 24 24"
            fill="none"
            stroke="#000000"
            stroke-width="1.5"
            stroke-linecap="butt"
            stroke-linejoin="bevel"
          >
            <polygon
              points="21.368 12.001 3 21.609 3 14 11 12 3 9.794 3 2.394"
            />
          </svg>
        </div>
      </ng-template>
    </mat-tab>

    <!-- <mat-tab [aria-label]="MainMenu.Call">
      <ng-template mat-tab-label>
        <div class="icon-item" matTooltip="Call" matTooltipPosition="after">
          <svg
            xmlns="http://www.w3.org/2000/svg"
            width="24"
            height="24"
            viewBox="0 0 24 24"
            fill="none"
            stroke="currentColor"
            stroke-width="1.5"
            stroke-linecap="round"
            stroke-linejoin="round"
            class="feather feather-phone"
          >
            <path
              class="st0"
              d="M2,5.8c0.1-0.6,0.3-1.1,0.7-1.6l1.7-1.7C4.7,2.2,5,2.1,5.3,2.1c0.3,0,0.6,0.1,0.8,0.4c0.3,0.3,0.6,0.6,0.9,0.9
                  		c0.2,0.2,0.3,0.3,0.5,0.5l1.4,1.4c0.3,0.3,0.4,0.6,0.4,0.9S9.2,6.7,8.9,7C8.8,7.2,8.6,7.3,8.5,7.5C8.1,7.9,7.7,8.3,7.2,8.7
                  		c0,0,0,0,0,0C6.8,9.1,6.9,9.5,7,9.7c0,0,0,0,0,0c0.4,0.9,0.9,1.7,1.6,2.6c1.4,1.7,2.9,3,4.5,4.1c0.2,0.1,0.4,0.2,0.6,0.3
                  		c0.2,0.1,0.4,0.2,0.5,0.3c0,0,0,0,0.1,0c0.2,0.1,0.3,0.1,0.4,0.1c0.4,0,0.6-0.2,0.7-0.3l1.7-1.7c0.3-0.3,0.6-0.4,0.8-0.4
                  		c0.4,0,0.6,0.2,0.8,0.4l2.8,2.8c0.6,0.6,0.6,1.2,0,1.7c-0.2,0.2-0.4,0.4-0.6,0.6c-0.3,0.3-0.7,0.6-1,1c-0.5,0.6-1.2,0.8-2,0.8
                  		c-0.1,0-0.2,0-0.2,0c-1.5-0.1-2.9-0.7-4-1.2c-2.9-1.4-5.4-3.4-7.5-5.9C4.5,13,3.3,11.1,2.6,9C2.1,7.7,1.9,6.7,2,5.8z"
            ></path>
          </svg>
        </div>
      </ng-template>
    </mat-tab> -->
  </mat-tab-group>

  <div class="left-side-tabs-body">
    <div
      #tabs
      id="tabs-0"
      class="left-side-tabs-contents"
      style="display: block;"
    >
      <app-layout-chat-left-sidenav-group
        class="left-group-side"
        (newGroupAndMember)="onClickNewGroupAndMember()"
        (openProfile)="onClickOpenProfile($event)"
      ></app-layout-chat-left-sidenav-group>
    </div>
    <div
      #tabs
      id="tabs-1"
      class="left-side-tabs-contents"
      style="display: none;"
    >
      <app-layout-chat-left-sidenav-chat
        [isVisible]="currentTabLable === MainMenu.Chat"
      ></app-layout-chat-left-sidenav-chat>
    </div>
    <div
      #tabs
      id="tabs-2"
      class="left-side-tabs-contents"
      style="display: none;"
    >
      <app-layout-chat-left-sidenav-organization
        [selectedUserList]="selectedUserList"
        [isVisible]="currentTabLable === MainMenu.Organization"
        (checkAllUser)="onCheckAllUser($event)"
        (checkUser)="onCheckUser($event)"
        (openProfile)="onClickOpenProfile($event)"
        (sendCall)="onClickSendClickToCall($event)"
        (sendSms)="onClickSendSms($event)"
        (toggleUser)="onToggleUser($event)"
        (resetSelectedUserList)="onResetSelectedUserList($event)"
        class="organization-side"
      ></app-layout-chat-left-sidenav-organization>
    </div>
    <div
      #tabs
      id="tabs-3"
      class="left-side-tabs-contents"
      style="display: none;"
    >
      <app-layout-chat-left-sidenav-message
        #messageBoxComponent
        [isVisible]="currentTabLable === MainMenu.Message"
        (doRefreshUnReadCount)="getMessageUnreadCount()"
      ></app-layout-chat-left-sidenav-message>
    </div>
    <div
      #tabs
      id="tabs-4"
      class="left-side-tabs-contents"
      style="display: none;"
    >
      <app-layout-chat-left-sidenav-call></app-layout-chat-left-sidenav-call>
    </div>
  </div>

  <ucap-float-action-button
    *ngIf="fabButtonShow"
    [fabButtons]="fabButtons"
    (buttonClick)="onClickFab($event)"
  ></ucap-float-action-button>
</div>
