public with sharing class FormTriggerHandler {
    public static final String SELF = 'Form__c';

    public static void onBeforeInsert(List<Form__c> listFormNew) {
        if (TriggerControl.isTriggerEnabled(SELF, TriggerOperation.BEFORE_INSERT)) {
            FormTriggerHelper.updateAcquisitionChannel(listFormNew);
        }
    }
    public static void onAfterInsert(Map<Id, Form__c> mapFormNew, List<Form__c> listFormNew) {
        if (TriggerControl.isTriggerEnabled(SELF, TriggerOperation.AFTER_INSERT)) {
            FormTriggerHelper.insertPromos(listFormNew);
            FormTriggerHelper.updateFormTriggerSMAndPromos(mapFormNew);
            FormTriggerHelper.notifyREACform(listFormNew);
        }
    }

    public static void onAfterUpdate(Map<Id, Form__c> mapFormNew, Map<Id, Form__c> mapFormOld) {
        if (TriggerControl.isTriggerEnabled(SELF, TriggerOperation.AFTER_UPDATE)) {
            TriggerControl.disableTrigger(SELF);
            FormTriggerHelper.updateFormTriggerSMAndPromos(mapFormNew);
            FormTriggerHelper.updatePromosTLAs(mapFormNew, mapFormOld);
        }
    }
}
