import { Injectable } from '@nestjs/common';
import { BaseUpdateStatusManager } from 'src/core/modules/domain/usecase/managers/base-update-status.manager';
import { BannerEntity } from '../../entities/banner.entity';
import {
  EventTopics,
  validateRelations,
} from 'src/core/strings/constants/interface.constants';
import { BannerModel } from '../../../data/models/banner.model';
import { BannerChangeStatusEvent } from '../../entities/event/banner-change-status.event';

@Injectable()
export class InactiveBannerManager extends BaseUpdateStatusManager<BannerEntity> {
  getResult(): string {
    return `Success inactive data ${this.result.title}`;
  }

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

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

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

  get validateRelations(): validateRelations[] {
    return [];
  }

  get entityTarget(): any {
    return BannerModel;
  }

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