//import { AircraftTypes, AssignmentTypes, EnhancementBundleOptions, EnhancementOptions, ModificationTypes, OpportunityTypes, ProductAttributes, ProgramTypes, TransactionSubTypes, TwentyFiveHrLeaseProducts } from "@business-logic/types/Enums";
import TestCase from "@business-logic/types/TestCase";
import { Rule } from "../types/RuleEngine";
import EnumUtils from "../../impl/utils/EnumUtils";
//import { validateEnhancementOptions, validateProductAttributes } from "./ApplicableModifications";
//import TransactionData from "@business-logic/types/TransactionData";

export enum BuiltInRules {
    TransactionExists = 1000,
    PricingExists = 1001,
    TerminationIsMod = 1002,
    TerminationHasReason = 1003,
    AircraftRequirement = 1004,
    ModificationTypeAssignment = 1005,
    ModificationTypeTrade = 1006,
    TwentyFiveHourLeaseSpecialty = 1007,
    TransactionPremiumOrNonPremiumOnly = 1008,
    OldTransactionPremiumOrNonPremiumOnly = 1009,
    PremiumSelectionRequirement = 1010,
    OldTransactionRequiresPremiumSelection = 1011,
    TerminationAndRepurchaseAdjustmentAmount = 1012,
    ProgramSpecificAttributes = 1013,
    ProgramSpecificEnhancements = 1014,
    InterimLeaseHasAircraftRate = 1015,
    ShareBinderNoPremiumSelection = 1016,
    TwentyFiveHourLeaseMustDefineTwentyFiveHourProduct = 1017,
    PartialAssignmentHoursToBeAssigned = 1018,
    MinicartLineItemsCannotBeEmpty = 1019,
    WaiveInternationalFeesValue = 1020,
    EarlyOutOptionTimeframeAndFeeStatus = 1021,
    DelayedStartDateOffsetRequiresValue = 1020,
    EnhancementsRequireAValue = 1021,
    NonPremiumMMFIncentiveRequirements = 1022,
    QSExecutiveRequirements = 1023
}

// Built-Ins shouldn't depend on other rules, custom rules however are supposed to depend on them
export const builtInRules: Rule<TestCase>[] = 
[
//{
//     id: BuiltInRules.TransactionExists,
//     name: "Transaction Exists Rule",
//     check: (testCase: TestCase) => {
//         return testCase.transaction != null;
//     }
// }, {
//     id: BuiltInRules.PricingExists,
//     name: "Pricing must exist on Transaction Rule",
//     check: (testCase: TestCase) => {
//         return testCase.transaction != null && testCase.transaction.pricing != null;
//     }
// }, {
//     id: BuiltInRules.TerminationIsMod,
//     name: "OpportunityType Termination requires TransactionSubType Mod",
//     check: (testCase: TestCase) => {

//         // Check old transactions
//         for (var transaction of testCase.oldTransactions) {
//             if (transaction.opportunityType == OpportunityTypes.Termination)
//                 return transaction.subType == TransactionSubTypes.Mod;
//         }

//         // Check transaction
//         if (testCase.transaction.opportunityType == OpportunityTypes.Termination)
//             return testCase.transaction.subType == TransactionSubTypes.Mod;
//         return true;
//     },
//     dependsOn: [BuiltInRules.TransactionExists]
// }, {
];