<ng-container *transloco="let t; prefix: 'statsUser.sessionArchetypes'">
<div class="session-archetypes-container">
  <div class="chart-header">
    <div class="chart-title">
      <h3>
        <i class="pi pi-bolt session-archetypes-icon"></i>
        {{ t('title') }}
        <i class="pi pi-question-circle chart-info-icon"
           [pTooltip]="t('tooltip')"
           tooltipPosition="bottom"
           tooltipStyleClass="chart-info-tooltip"
           [appendTo]="'body'"></i>
      </h3>
      <p class="chart-description">{{ t('description') }}</p>
    </div>
    <div class="year-nav">
      <button class="nav-btn" (click)="changeYear(-1)"><i class="pi pi-chevron-left"></i></button>
      <span class="year-label">{{ currentYear }}</span>
      <button class="nav-btn" (click)="changeYear(1)"><i class="pi pi-chevron-right"></i></button>
    </div>
  </div>
  @if (hasData) {
    <div class="stats-row">
      <div class="stat-card sessions">
        <span class="stat-value">{{ sessionCount }}</span>
        <span class="stat-label">{{ t('sessions') }}</span>
      </div>
      <div class="stat-card archetype">
        <span class="stat-value">{{ dominantArchetype }}</span>
        <span class="stat-label">{{ t('dominantType') }}</span>
      </div>
    </div>
    <div class="chart-wrapper">
      <canvas baseChart [data]="chartData" [options]="chartOptions" [type]="chartType"></canvas>
    </div>
  } @else {
    <div class="no-data-message">
      <i class="pi pi-info-circle"></i>
      <p>{{ t('noData') }}</p>
      <small>{{ t('noDataHint') }}</small>
    </div>
  }
</div>
</ng-container>
