// import { CatalogRoleTagComponent } from '@/shared/catalog/roles';
import { AbstractList } from '@/shared/abstractClasses/abstract-list';
import { PageDataListComponent } from '@/shared/components/pageDataList/page-data-list.component';
import { Component, inject } from '@angular/core';
import { DeviceBrandFormComponent } from '../components/form.component';
import { IDeviceBrandResponse } from '../models';
import { DeviceBrandsService } from '../services/main.service';

@Component({
  selector: 'superAdmin-deviceBrands',
  templateUrl: './list.component.html',
  imports: [PageDataListComponent, DeviceBrandFormComponent],
})
export class DeviceBrandsComponent extends AbstractList<IDeviceBrandResponse> {
  private readonly service = inject(DeviceBrandsService);

  override setColumns(): void {
    this.columns = [
      // { field: 'id', header: 'شناسه', type: 'id' },
      { field: 'name', header: 'عنوان' },
      {
        field: 'created_at',
        header: 'تاریخ ایجاد',
        type: 'date',
      },
    ];
  }

  override getDataRequest() {
    return this.service.getAll();
  }

  // toSinglePage(partner: IDeviceBrandResponse) {
  //   this.router.navigateByUrl(partnersNamedRoutes.partner.meta.pagePath!(partner.id));
  // }
}
