/**
 * @aurora-catalyst-generated
 * @source cliter/iam/tenant-account.aurora.yaml
 */
import { type DataTableColumnDef } from '@aurora';
import { TranslocoService } from '@jsverse/transloco';
import { type IamTenantAccount } from '@src/src/app/aurora.types';

export const getTenantAccountStandaloneColumns = (properties?: {
  translator?: TranslocoService;
}): DataTableColumnDef<IamTenantAccount>[] => {
  const { translator = null } = properties ?? {};

  return [
    {
      accessorKey: 'tenant.name',
      id: 'tenant.name',
      relation: { association: 'tenant' },
      label: () => translator?.translate('iam.tenant-account.Tenant') ?? 'Tenant',
      sortable: true,
      searchable: true,
      filterable: true,
      exportable: true,
      cell: (info) => `${info.getValue<string>() ?? ''}`,
    },
    {
      accessorKey: 'account.name',
      id: 'account.name',
      relation: { association: 'account' },
      label: () => translator?.translate('iam.tenant-account.Account') ?? 'Account',
      sortable: true,
      searchable: true,
      filterable: true,
      exportable: true,
      cell: (info) => `${info.getValue<string>() ?? ''}`,
    },
  ];
};
