/**
 * @aurora-catalyst-generated
 * @source cliter/iam/tag.aurora.yaml
 */
import { Pagination } from '@api/graphql';
import { IamPaginateTagsService } from '@app/iam/tag';
import { IamTagFieldSchema } from '@app/iam/tag/domain';
import { Format, HandlerMeta } from '@aurorajs.dev/core-back';
import { QueryStatement } from '@aurorajs.dev/core-common';
import { Injectable } from '@nestjs/common';

@Injectable()
export class IamPaginateTagsHandler {
  constructor(private readonly paginateService: IamPaginateTagsService) {}

  @Format(IamTagFieldSchema)
  async main(
    queryStatement?: QueryStatement,
    constraint?: QueryStatement,
    handlerMeta?: HandlerMeta,
  ): Promise<Pagination> {
    return await this.paginateService.main(queryStatement, constraint, handlerMeta);
  }
}
