import { CompositeSpecification } from "@repo/rdx-ddd";
import { CustomerInvoice } from "../aggregates";
import { INVOICE_STATUS } from "../value-objects";

export class ProformaCanTranstionToIssuedSpecification extends CompositeSpecification<CustomerInvoice> {
  public async isSatisfiedBy(proforma: CustomerInvoice): Promise<boolean> {
    return proforma.canTransitionTo(INVOICE_STATUS.ISSUED);
  }
}
