// import { CatalogRoleTagComponent } from '@/shared/catalog/roles';
import { AbstractList } from '@/shared/abstractClasses/abstract-list';
import {
  IColumn,
  PageDataListComponent,
} from '@/shared/components/pageDataList/page-data-list.component';
import { superAdminConsumerAccountListConfig } from '@/shared/constants/list-configs';
import { Component, inject, Input } from '@angular/core';
import { IConsumerAccountResponse } from '../../models';
import { AdminConsumerAccountsService } from '../../services/accounts.service';
import { ConsumerAccountFormComponent } from './form.component';

@Component({
  selector: 'superAdmin-consumer-account-list',
  templateUrl: './list.component.html',
  imports: [PageDataListComponent, ConsumerAccountFormComponent],
})
export class ConsumerAccountListComponent extends AbstractList<IConsumerAccountResponse> {
  @Input({ required: true }) consumerId!: string;
  @Input() fullHeight?: boolean;
  @Input() header: IColumn[] = superAdminConsumerAccountListConfig.columns;
  private readonly service = inject(AdminConsumerAccountsService);

  override setColumns(): void {
    this.columns = this.header;
  }

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