import buildAction from '../builders/build-action';
import buildOptions from '../builders/build-options';
import buildReadonly from '../builders/build-readonly';
import buildValue from '../builders/build-value';
import type { Elements as ActionElements } from './map/actions';
import type { Elements as ValuesElements } from './map/values';

function wrapElementsBuilders<C, T extends Record<ValuesElements | ActionElements, C>>(arg: T) {
  return arg;
}

const builders = wrapElementsBuilders({
  cbxRecalcWithRevision: buildValue,
  tbxLeaseObjectPrice: buildValue,
  tbxLeaseObjectPriceWthtVAT: buildValue,
  tbxVATInLeaseObjectPrice: buildValue,
  tbxEngineHours: buildValue,
  tbxSupplierDiscountRub: buildValue,
  tbxSupplierDiscountPerc: buildValue,
  tbxLeasingPeriod: buildValue,
  tbxFirstPaymentPerc: buildValue,
  tbxFirstPaymentRub: buildValue,
  tbxLastPaymentPerc: buildValue,
  tbxLastPaymentRub: buildValue,
  selectImportProgram: buildOptions,
  tbxImportProgramSum: buildReadonly,
  tbxAddEquipmentPrice: buildValue,
  tbxRedemptionPaymentSum: buildValue,
  tbxParmentsDecreasePercent: buildValue,
  tbxComissionPerc: buildValue,
  tbxComissionRub: buildValue,
  tbxSaleBonus: buildValue,
  tbxIRR_Perc: buildValue,
  tbxLeaseObjectCount: buildValue,
  cbxWithTrailer: buildValue,
  cbxLeaseObjectUsed: buildValue,
  tbxMaxMass: buildValue,
  tbxCountSeats: buildValue,
  tbxMaxSpeed: buildValue,
  tbxLeaseObjectYear: buildValue,
  tbxLeaseObjectMotorPower: buildValue,
  tbxEngineVolume: buildValue,
  tbxDealerRewardSumm: buildValue,
  tbxDealerBrokerRewardSumm: buildValue,
  tbxIndAgentRewardSumm: buildValue,
  tbxCalcDoubleAgentRewardSumm: buildValue,
  tbxCalcBrokerRewardSum: buildValue,
  tbxFinDepartmentRewardSumm: buildValue,
  cbxInsDecentral: buildValue,
  tbxInsFranchise: buildValue,
  cbxInsUnlimitDrivers: buildValue,
  tbxInsAgeDrivers: buildValue,
  tbxInsExpDrivers: buildValue,
  tbxINNForCalc: buildValue,
  cbxLastPaymentRedemption: buildValue,
  cbxPriceWithDiscount: buildValue,
  cbxFullPriceWithDiscount: buildValue,
  cbxCostIncrease: buildValue,
  cbxInsurance: buildValue,
  cbxRegistrationQuote: buildValue,
  cbxTechnicalCardQuote: buildValue,
  cbxNSIB: buildValue,
  tbxQuoteName: buildValue,
  cbxQuoteRedemptionGraph: buildValue,
  cbxShowFinGAP: buildValue,
  tbxCreditRate: buildValue,
  tbxMaxPriceChange: buildValue,
  tbxImporterRewardPerc: buildValue,
  tbxImporterRewardRub: buildValue,
  cbxDisableChecks: buildValue,
  tbxMileage: buildValue,
  tbxTotalPayments: buildValue,
  tbxVehicleTaxInYear: buildValue,
  tbxVehicleTaxInLeasingPeriod: buildValue,
  tbxMinPriceChange: buildValue,

  selectProduct: buildOptions,
  selectClientRisk: buildOptions,
  selectClientType: buildOptions,
  selectSupplierCurrency: buildOptions,
  selectSeasonType: buildOptions,
  selectHighSeasonStart: buildOptions,
  selectLeaseObjectType: buildOptions,
  selectBrand: buildOptions,
  selectModel: buildOptions,
  selectConfiguration: buildOptions,
  selectLeaseObjectUseFor: buildOptions,
  selectLeaseObjectCategory: buildOptions,
  selectEngineType: buildOptions,
  selectDealer: buildOptions,
  selectDealerPerson: buildOptions,
  selectDealerRewardCondition: buildOptions,
  selectDealerBroker: buildOptions,
  selectDealerBrokerRewardCondition: buildOptions,
  selectIndAgent: buildOptions,
  selectIndAgentRewardCondition: buildOptions,
  selectCalcDoubleAgent: buildOptions,
  selectCalcDoubleAgentRewardCondition: buildOptions,
  selectCalcBroker: buildOptions,
  selectCalcBrokerRewardCondition: buildOptions,
  selectCalcFinDepartment: buildOptions,
  selectFinDepartmentRewardCondtion: buildOptions,
  selectGPSBrand: buildOptions,
  selectGPSModel: buildOptions,
  selectRegionRegistration: buildOptions,
  selectTownRegistration: buildOptions,
  selectRegistration: buildOptions,
  selectInsNSIB: buildOptions,
  selectTracker: buildOptions,
  selectTelematic: buildOptions,
  selectTechnicalCard: buildOptions,
  selectTarif: buildOptions,
  selectRate: buildOptions,
  selectLead: buildOptions,
  selectOpportunity: buildOptions,
  selectQuote: buildOptions,
  selectObjectRegionRegistration: buildOptions,
  selectObjectCategoryTax: buildOptions,
  selectObjectTypeTax: buildOptions,
  selectLegalClientRegion: buildOptions,
  selectLegalClientTown: buildOptions,
  selectSubsidy: buildOptions,
  selectFuelCard: buildOptions,
  radioBalanceHolder: buildOptions,
  radioLastPaymentRule: buildOptions,
  radioGraphType: buildOptions,
  radioDeliveryTime: buildOptions,
  radioInsKaskoType: buildOptions,
  radioInfuranceOPF: buildOptions,
  selectRequirementTelematic: buildOptions,
  radioQuoteContactGender: buildOptions,
  radioCalcType: buildOptions,
  radioObjectRegistration: buildOptions,
  radioTypePTS: buildOptions,
  tbxBonusCoefficient: buildValue,

  labelLeaseObjectRisk: buildReadonly,
  tbxInsKaskoPriceLeasePeriod: buildReadonly,
  labelIrrInfo: buildReadonly,
  labelRegistrationDescription: buildReadonly,
  labelDepreciationGroup: buildReadonly,
  tbxSubsidySum: buildReadonly,

  btnCreateKP: buildAction,
  btnCalculate: buildAction,

  linkDownloadKp: buildReadonly,
  linkLeadUrl: buildReadonly,
  linkOpportunityUrl: buildReadonly,
  linkQuoteUrl: buildReadonly,
});

export default builders;
