<ng-container *transloco="let t; prefix: 'statsUser.completionTimeline'">
<div class="completion-timeline-container">
  <div class="chart-header">
    <div class="chart-title">
      <h3>
        <i class="pi pi-calendar completion-title-icon"></i>
        {{ t('title') }}
      </h3>
      <p class="chart-description">{{ t('description') }}</p>
    </div>
    <div class="year-selector">
      <button type="button"
              class="year-nav-btn"
              (click)="changeYear(-1)"
              [title]="t('previousYear')">
        <i class="pi pi-chevron-left"></i>
      </button>
      <span class="current-year">{{ currentYear }}</span>
      <button type="button"
              class="year-nav-btn"
              (click)="changeYear(1)"
              [title]="t('nextYear')">
        <i class="pi pi-chevron-right"></i>
      </button>
    </div>
  </div>
  <div class="chart-wrapper">
    <canvas baseChart
            [data]="(chartData$ | async) ?? {labels: [], datasets: []}"
            [options]="chartOptions"
            [type]="chartType">
    </canvas>
  </div>
</div>
</ng-container>
