// 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 { GuildGoodCategoriesListComponent } from '../../components/categories/list.component';
import { guildGoodCategoriesNamedRoutes } from '../../constants/routes/goodCategories';
import { GuildStore } from '../../store/guild.store';

@Component({
  selector: 'admin-guild-good-categories',
  templateUrl: './list.component.html',
  imports: [GuildGoodCategoriesListComponent],
})
export class GuildGoodCategoriesComponent {
  private readonly route = inject(ActivatedRoute);
  private readonly breadcrumbService = inject(BreadcrumbService);
  private readonly store = inject(GuildStore);

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

  ngOnInit() {
    this.setBreadcrumb();
  }

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