// import { CatalogRoleTagComponent } from '@/shared/catalog/roles';
import { BreadcrumbService } from '@/core/services';
import { Component, inject, signal } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { ConsumerAccountListComponent } from '../../components/accounts/list.component';
import { partnerConsumerAccountsNamedRoutes } from '../../constants/routes/accounts';
import { ConsumerStore } from '../../store/consumer.store';

@Component({
  selector: 'partner-consumer-accounts',
  templateUrl: './list.component.html',
  imports: [ConsumerAccountListComponent],
})
export class ConsumerAccountsComponent {
  private readonly route = inject(ActivatedRoute);
  private readonly breadcrumbService = inject(BreadcrumbService);
  private readonly store = inject(ConsumerStore);

  consumerId = signal<string>(this.route.snapshot.params['consumerId']);

  ngOnInit() {
    this.setBreadcrumb();
  }

  setBreadcrumb() {
    this.breadcrumbService.setItems([
      ...this.store.breadcrumbItems(),
      {
        title: partnerConsumerAccountsNamedRoutes.accounts.meta.title,
      },
    ]);
  }
}
