import { Injectable } from '@nestjs/common';
import { BaseDeleteManager } from 'src/core/modules/domain/usecase/managers/base-delete.manager';
import { PaymentMethodEntity } from '../../entities/payment-method.entity';
import {
  EventTopics,
  validateRelations,
} from 'src/core/strings/constants/interface.constants';
import { PaymentMethodModel } from '../../../data/models/payment-method.model';
import { PaymentMethodDeletedEvent } from '../../entities/event/payment-method-deleted.event';

@Injectable()
export class DeletePaymentMethodManager extends BaseDeleteManager<PaymentMethodEntity> {
  getResult(): string {
    return `Success`;
  }

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

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

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

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

  get entityTarget(): any {
    return PaymentMethodModel;
  }

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