import { Injectable } from '@nestjs/common';
import { BaseUpdateStatusManager } from 'src/core/modules/domain/usecase/managers/base-update-status.manager';
import {
  EventTopics,
  validateRelations,
} from 'src/core/strings/constants/interface.constants';
import { TenantChangeStatusEvent } from '../../entities/event/tenant-change-status.event';
import { UserEntity } from 'src/modules/user-related/user/domain/entities/user.entity';
import { UserModel } from 'src/modules/user-related/user/data/models/user.model';

@Injectable()
export class ConfirmTenantManager extends BaseUpdateStatusManager<UserEntity> {
  get validateRelations(): validateRelations[] {
    return [];
  }

  getResult(): string {
    return `Success active data ${this.result.name}`;
  }

  async validateProcess(): Promise<void> {
    return;
  }

  async beforeProcess(): Promise<void> {
    return;
  }

  async afterProcess(): Promise<void> {
    return;
  }

  get entityTarget(): any {
    return UserModel;
  }

  get eventTopics(): EventTopics[] {
    return [
      {
        topic: TenantChangeStatusEvent,
        data: this.data,
      },
    ];
  }
}
