// import { CatalogRoleTagComponent } from '@/shared/catalog/roles';
import { AbstractList } from '@/shared/abstractClasses/abstract-list';
import { Component, inject } from '@angular/core';
import { ConsumerBusinessActivityListComponent } from '../components/list.component';
import { IBusinessActivityResponse } from '../models';
import { BusinessActivitiesService } from '../services/main.service';

@Component({
  selector: 'consumer-businessActivities',
  templateUrl: './list.component.html',
  imports: [ConsumerBusinessActivityListComponent],
})
export class ConsumerBusinessActivitiesComponent extends AbstractList<IBusinessActivityResponse> {
  private readonly service = inject(BusinessActivitiesService);

  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();
  }
}
