// import { CatalogRoleTagComponent } from '@/shared/catalog/roles';
import { BreadcrumbService } from '@/core/services';
import pageParamsUtils from '@/utils/page-params.utils';
import { Component, computed, inject, signal } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { ConsumerBusinessActivitiesComponent } from '../../components/businessActivities/list.component';
import { partnerConsumerBusinessActivitiesNamedRoutes } from '../../constants/routes/businessActivities';
import { ConsumerStore } from '../../store/consumer.store';

@Component({
  selector: 'partner-user-businessActivities',
  templateUrl: './list.component.html',
  imports: [ConsumerBusinessActivitiesComponent],
})
export class PartnerUserBusinessActivitiesComponent {
  private readonly route = inject(ActivatedRoute);
  private readonly breadcrumbService = inject(BreadcrumbService);
  private readonly consumerStore = inject(ConsumerStore);

  pageParams = computed(() => pageParamsUtils(this.route));
  consumerId = signal<string>(this.pageParams()['consumerId']);

  ngOnInit() {
    this.setBreadcrumb();
  }

  setBreadcrumb() {
    this.breadcrumbService.setItems([
      ...this.consumerStore.breadcrumbItems(),
      {
        title: partnerConsumerBusinessActivitiesNamedRoutes.businessActivities.meta.title,
      },
    ]);
  }
}
