import { ActionsNames } from 'core/types/Calculation/Store/effect';
import { LinksNames } from 'core/types/Calculation/Store/links';
import {
  ComputedValuesNames,
  ValuesNames,
} from 'core/types/Calculation/Store/values';
import {
  ButtonElementsNames,
  ComputedElementsNames,
  ElementsNames,
  LinkElementsNames,
} from '../types/elements';

const elementsValues: Record<ElementsNames, ValuesNames> = {
  selectLead: 'lead',
  selectOpportunity: 'opportunity',
  selectQuote: 'quote',
  cbxRecalcWithRevision: 'recalcWithRevision',
  selectProduct: 'product',
  selectClientRisk: 'clientRisk',
  selectClientType: 'clientType',
  tbxLeaseObjectPrice: 'leaseObjectPrice',
  tbxLeaseObjectPriceWthtVAT: 'leaseObjectPriceWthtVAT',
  tbxVATInLeaseObjectPrice: 'VATInLeaseObjectPrice',
  tbxEngineHours: 'engineHours',
  selectSupplierCurrency: 'supplierCurrency',
  tbxSupplierDiscountRub: 'supplierDiscountRub',
  tbxSupplierDiscountPerc: 'supplierDiscountPerc',
  tbxLeasingPeriod: 'leasingPeriod',
  tbxFirstPaymentPerc: 'firstPaymentPerc',
  tbxFirstPaymentRub: 'firstPaymentRub',
  tbxLastPaymentPerc: 'lastPaymentPerc',
  tbxLastPaymentRub: 'lastPaymentRub',
  radioLastPaymentRule: 'lastPaymentRule',
  tbxRedemptionPaymentSum: 'redemptionPaymentSum',
  radioBalanceHolder: 'balanceHolder',
  radioGraphType: 'graphType',
  tbxParmentsDecreasePercent: 'parmentsDecreasePercent',
  selectSeasonType: 'seasonType',
  selectHighSeasonStart: 'highSeasonStart',
  tbxComissionPerc: 'comissionPerc',
  tbxComissionRub: 'comissionRub',
  tbxSaleBonus: 'saleBonus',
  tbxBonusCoefficient: 'bonusCoefficient',
  tbxIRR_Perc: 'IRR_Perc',
  selectLeaseObjectType: 'leaseObjectType',
  radioDeliveryTime: 'deliveryTime',
  labelDepreciationGroup: 'depreciationGroup',
  tbxLeaseObjectCount: 'leaseObjectCount',
  cbxWithTrailer: 'withTrailer',
  cbxLeaseObjectUsed: 'leaseObjectUsed',
  tbxMaxMass: 'maxMass',
  tbxCountSeats: 'countSeats',
  tbxMaxSpeed: 'maxSpeed',
  selectBrand: 'brand',
  selectModel: 'model',
  selectConfiguration: 'configuration',
  tbxLeaseObjectYear: 'leaseObjectYear',
  selectEngineType: 'engineType',
  selectLeaseObjectCategory: 'leaseObjectCategory',
  tbxLeaseObjectMotorPower: 'leaseObjectMotorPower',
  tbxEngineVolume: 'engineVolume',
  selectLeaseObjectUseFor: 'leaseObjectUseFor',
  selectDealer: 'dealer',
  selectDealerPerson: 'dealerPerson',
  selectDealerRewardCondition: 'dealerRewardCondition',
  tbxDealerRewardSumm: 'dealerRewardSumm',
  selectDealerBroker: 'dealerBroker',
  selectDealerBrokerRewardCondition: 'dealerBrokerRewardCondition',
  tbxDealerBrokerRewardSumm: 'dealerBrokerRewardSumm',
  selectIndAgent: 'indAgent',
  selectIndAgentRewardCondition: 'indAgentRewardCondition',
  tbxIndAgentRewardSumm: 'indAgentRewardSumm',
  selectCalcDoubleAgent: 'calcDoubleAgent',
  selectCalcDoubleAgentRewardCondition: 'calcDoubleAgentRewardCondition',
  tbxCalcDoubleAgentRewardSumm: 'calcDoubleAgentRewardSumm',
  selectCalcBroker: 'calcBroker',
  selectCalcBrokerRewardCondition: 'calcBrokerRewardCondition',
  tbxCalcBrokerRewardSum: 'calcBrokerRewardSum',
  selectCalcFinDepartment: 'calcFinDepartment',
  selectFinDepartmentRewardCondtion: 'finDepartmentRewardCondtion',
  tbxFinDepartmentRewardSumm: 'finDepartmentRewardSumm',
  selectGPSBrand: 'GPSBrand',
  selectGPSModel: 'GPSModel',
  selectRegionRegistration: 'regionRegistration',
  selectTownRegistration: 'townRegistration',
  radioInfuranceOPF: 'infuranceOPF',
  radioInsKaskoType: 'insKaskoType',
  cbxInsDecentral: 'insDecentral',
  tbxInsFranchise: 'insFranchise',
  cbxInsUnlimitDrivers: 'insUnlimitDrivers',
  tbxInsAgeDrivers: 'insAgeDrivers',
  tbxInsExpDrivers: 'insExpDrivers',
  tbxINNForCalc: 'INNForCalc',
  cbxLastPaymentRedemption: 'lastPaymentRedemption',
  cbxPriceWithDiscount: 'priceWithDiscount',
  cbxFullPriceWithDiscount: 'fullPriceWithDiscount',
  cbxCostIncrease: 'costIncrease',
  cbxInsurance: 'insurance',
  cbxRegistrationQuote: 'registrationQuote',
  cbxTechnicalCardQuote: 'technicalCardQuote',
  cbxNSIB: 'NSIB',
  tbxQuoteName: 'quoteName',
  radioQuoteContactGender: 'quoteContactGender',
  cbxQuoteRedemptionGraph: 'quoteRedemptionGraph',
  cbxShowFinGAP: 'showFinGAP',
  selectTarif: 'tarif',
  tbxCreditRate: 'creditRate',
  selectRate: 'rate',
  tbxMaxPriceChange: 'maxPriceChange',
  tbxImporterRewardPerc: 'importerRewardPerc',
  tbxImporterRewardRub: 'importerRewardRub',
  cbxDisableChecks: 'disableChecks',
  selectRegistration: 'registration',
  selectInsNSIB: 'insNSIB',
  selectTechnicalCard: 'technicalCard',
  radioRequirementTelematic: 'requirementTelematic',
  selectTelematic: 'telematic',
  selectTracker: 'tracker',
  tbxMileage: 'mileage',
  radioCalcType: 'calcType',
  tbxTotalPayments: 'totalPayments',
  radioObjectRegistration: 'objectRegistration',
  selectObjectRegionRegistration: 'objectRegionRegistration',
  tbxVehicleTaxInYear: 'vehicleTaxInYear',
  tbxVehicleTaxInLeasingPeriod: 'vehicleTaxInLeasingPeriod',
  selectObjectCategoryTax: 'objectCategoryTax',
  selectObjectTypeTax: 'objectTypeTax',
  radioTypePTS: 'typePTS',
  selectLegalClientRegion: 'legalClientRegion',
  selectLegalClientTown: 'legalClientTown',
  selectSubsidy: 'subsidy',
  labelSubsidySum: 'subsidySum',
  selectFuelCard: 'fuelCard',
  tbxMinPriceChange: 'minPriceChange',
  selectImportProgram: 'importProgram',
  tbxAddEquipmentPrice: 'addEquipmentPrice',
  tbxVIN: 'vin',
  selectLeasingWithoutKasko: 'leasingWithoutKasko',

  /** Result Elements */
  labelResultTotalGraphwithNDS: 'resultTotalGraphwithNDS',
  labelResultPlPrice: 'resultPlPrice',
  labelResultPriceUpPr: 'resultPriceUpPr',
  labelResultIRRGraphPerc: 'resultIRRGraphPerc',
  labelResultIRRNominalPerc: 'resultIRRNominalPerc',
  labelResultInsKasko: 'resultInsKasko',
  labelResultInsOsago: 'resultInsOsago',
  labelResultDopProdSum: 'resultDopProdSum',
  labelResultFirstPayment: 'resultFirstPayment',
  labelResultLastPayment: 'resultLastPayment',
  labelResultTerm: 'resultTerm',
  labelResultAB_FL: 'resultAB_FL',
  labelResultAB_UL: 'resultAB_UL',
  labelResultBonusMPL: 'resultBonusMPL',
  labelResultDopMPLLeasing: 'resultDopMPLLeasing',
  labelResultBonusDopProd: 'resultBonusDopProd',
  labelResultBonusSafeFinance: 'resultBonusSafeFinance',
  labelResultFirstPaymentRiskPolicy: 'resultFirstPaymentRiskPolicy',
  labelResultParticipationAmount: 'resultParticipationAmount',
};

const elementsComputedValues: Record<
  ComputedElementsNames,
  ComputedValuesNames
> = {
  labelLeaseObjectRisk: 'leaseObjectRiskName',
  tbxInsKaskoPriceLeasePeriod: 'insKaskoPriceLeasePeriod',
  labelIrrInfo: 'irrInfo',
  labelRegistrationDescription: 'registrationDescription',
  labelImportProgramSum: 'importProgramSum',
};

const elementsActions: Record<ButtonElementsNames, ActionsNames> = {
  btnCalculate: 'calculate',
  btnCreateKP: 'createKP',
};

const elementsLinks: Record<LinkElementsNames, LinksNames> = {
  linkDownloadKp: 'kpUrl',
};

export default Object.assign(
  elementsValues,
  elementsComputedValues,
  elementsActions,
  elementsLinks,
);
