@axos-web-dev/shared-components 1.0.5 → 1.0.7-7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. package/dist/ATMLocator/ATMLocator.js +39 -30
  2. package/dist/Accordion/Accordion.css.d.ts +1 -1
  3. package/dist/Article/Article.css.d.ts +41 -41
  4. package/dist/Article/Article.js +2 -14
  5. package/dist/ArticlesSet/ArticlesSet.css.d.ts +16 -16
  6. package/dist/Auth/ErrorAlert.css.d.ts +4 -0
  7. package/dist/Auth/ErrorAlert.css.js +11 -0
  8. package/dist/Auth/ErrorAlert.d.ts +14 -0
  9. package/dist/Auth/ErrorAlert.js +183 -0
  10. package/dist/Auth/Logout.d.ts +3 -0
  11. package/dist/Auth/Logout.js +29 -0
  12. package/dist/Auth/SignIn.css.d.ts +6 -0
  13. package/dist/Auth/SignIn.css.js +18 -0
  14. package/dist/Auth/SignInPassword.d.ts +15 -0
  15. package/dist/Auth/SignInPassword.js +118 -0
  16. package/dist/Auth/index.d.ts +5 -0
  17. package/dist/Auth/index.js +20 -0
  18. package/dist/Button/Button.css.d.ts +31 -18
  19. package/dist/Button/Button.css.js +1 -1
  20. package/dist/Button/Button.js +11 -2
  21. package/dist/Calculators/AnnualFeeCalculator/AnnualFeeCalculator.css.d.ts +12 -12
  22. package/dist/Calculators/ApyCalculator/ApyCalculator.css.d.ts +14 -14
  23. package/dist/Calculators/ApyCalculator/index.js +20 -12
  24. package/dist/Calculators/AxosOneCalculator/BalanceAPYCalculator.css.d.ts +8 -8
  25. package/dist/Calculators/AxosOneCalculator/index.js +12 -4
  26. package/dist/Calculators/BalanceAPYCalculator/BalanceAPYCalculator.css.d.ts +22 -22
  27. package/dist/Calculators/BuyDownCalculator/BuyDownCalculator.css.d.ts +101 -0
  28. package/dist/Calculators/BuyDownCalculator/BuyDownCalculator.css.js +56 -0
  29. package/dist/Calculators/BuyDownCalculator/index.d.ts +25 -0
  30. package/dist/Calculators/BuyDownCalculator/index.js +855 -0
  31. package/dist/Calculators/Calculator.js +26 -8
  32. package/dist/Calculators/MonthlyPaymentCalculator/MonthlyPaymentCalculator.css.d.ts +12 -12
  33. package/dist/Calculators/MonthlyPaymentLVFCalculator/MonthlyPaymentCalculator.css.d.ts +12 -12
  34. package/dist/Calculators/SummitApyCalculator/BalanceAPYCalculator.css.d.ts +8 -8
  35. package/dist/Calculators/calculator.css.d.ts +12 -12
  36. package/dist/Calculators/index.d.ts +1 -0
  37. package/dist/Calculators/index.js +2 -0
  38. package/dist/CallToActionBar/index.js +4 -2
  39. package/dist/Carousel/Carousel.css.d.ts +20 -20
  40. package/dist/Carousel/index.js +12 -3
  41. package/dist/Chevron/Chevron.css.d.ts +6 -6
  42. package/dist/Chevron/index.js +12 -3
  43. package/dist/Comparison/Comparison.css.d.ts +11 -10
  44. package/dist/Comparison/Comparison.css.js +3 -1
  45. package/dist/Comparison/Comparison.js +17 -8
  46. package/dist/Comparison/index.js +2 -1
  47. package/dist/ContentBanner/ContentBanner.css.d.ts +12 -12
  48. package/dist/ContentBanner/index.js +9 -1
  49. package/dist/ExecutiveBio/ExecutiveBio.css.d.ts +31 -31
  50. package/dist/ExecutiveBio/ExecutiveBio.js +13 -27
  51. package/dist/FaqAccordion/index.js +13 -4
  52. package/dist/FooterSiteMap/AxosBank/FooterSiteMap.js +11 -2
  53. package/dist/Forms/ApplicationStart.js +8 -1
  54. package/dist/Forms/ApplyNow.js +12 -3
  55. package/dist/Forms/ClearingForm.js +8 -1
  56. package/dist/Forms/CommercialDeposits.js +7 -0
  57. package/dist/Forms/CommercialLending.js +8 -1
  58. package/dist/Forms/CommercialPremiumFinance.d.ts +10 -0
  59. package/dist/Forms/CommercialPremiumFinance.js +202 -0
  60. package/dist/Forms/ContactCompany.js +8 -1
  61. package/dist/Forms/ContactCompanyTitle.js +8 -1
  62. package/dist/Forms/ContactUs.js +8 -1
  63. package/dist/Forms/ContactUsAAS.js +8 -3
  64. package/dist/Forms/ContactUsBusiness.d.ts +1 -1
  65. package/dist/Forms/ContactUsBusiness.js +26 -10
  66. package/dist/Forms/ContactUsBusinessNameEmail.d.ts +9 -0
  67. package/dist/Forms/ContactUsBusinessNameEmail.js +272 -0
  68. package/dist/Forms/ContactUsLVF.js +8 -1
  69. package/dist/Forms/ContactUsNMLSId.js +21 -5
  70. package/dist/Forms/CpraRequest.d.ts +1 -1
  71. package/dist/Forms/CpraRequest.js +63 -61
  72. package/dist/Forms/CraPublicFile.d.ts +5 -5
  73. package/dist/Forms/CraPublicFile.js +55 -41
  74. package/dist/Forms/DealerServices.js +8 -1
  75. package/dist/Forms/EmailOnly.js +13 -4
  76. package/dist/Forms/FormEnums.d.ts +21 -0
  77. package/dist/Forms/FormEnums.js +255 -0
  78. package/dist/Forms/Forms.css.d.ts +42 -42
  79. package/dist/Forms/MortgageRate/MortgageRateForm.js +15 -6
  80. package/dist/Forms/MortgageRate/MortgageRateWatch.js +13 -4
  81. package/dist/Forms/QuickPricer/QuickPricerForm.d.ts +1 -1
  82. package/dist/Forms/QuickPricer/QuickPricerForm.js +6 -8
  83. package/dist/Forms/ScheduleCall.js +8 -1
  84. package/dist/Forms/ScheduleCallPremier.js +8 -1
  85. package/dist/Forms/SuccesForm.js +28 -19
  86. package/dist/Forms/WcplSurvey.js +8 -1
  87. package/dist/Forms/index.d.ts +2 -0
  88. package/dist/Forms/index.js +4 -0
  89. package/dist/HelpArticle/HelpArticle.css.d.ts +4 -0
  90. package/dist/HelpArticle/HelpArticle.css.js +12 -0
  91. package/dist/HelpArticle/index.d.ts +1 -0
  92. package/dist/HelpArticle/index.js +7 -0
  93. package/dist/HeroBanner/HeroBanner.css.d.ts +17 -17
  94. package/dist/HeroBanner/HeroBanner.css.js +5 -5
  95. package/dist/HeroBanner/HeroBanner.js +0 -2
  96. package/dist/HeroBanner/LargeBanner.css.d.ts +20 -20
  97. package/dist/HeroBanner/SelectionBanner.css.d.ts +8 -8
  98. package/dist/Hyperlink/index.js +14 -5
  99. package/dist/IconBillboard/IconBillboard.css.d.ts +25 -25
  100. package/dist/IconBillboard/IconBillboard.css.js +3 -3
  101. package/dist/IconBillboard/IconBillboard.interface.d.ts +3 -0
  102. package/dist/IconBillboard/IconBillboard.js +37 -7
  103. package/dist/IconBillboard/IconBillboardSet.js +1 -1
  104. package/dist/ImageBillboard/ExitIntentModal/ModalWrapper.d.ts +9 -0
  105. package/dist/ImageBillboard/ExitIntentModal/ModalWrapper.js +85 -0
  106. package/dist/ImageBillboard/ExitIntentModal/useExitIntentModal.d.ts +5 -0
  107. package/dist/ImageBillboard/ExitIntentModal/useExitIntentModal.js +90 -0
  108. package/dist/ImageBillboard/ImageBillboard.css.d.ts +36 -20
  109. package/dist/ImageBillboard/ImageBillboard.css.js +50 -18
  110. package/dist/ImageBillboard/ImageBillboard.interface.d.ts +13 -2
  111. package/dist/ImageBillboard/ImageBillboardSet.d.ts +1 -1
  112. package/dist/ImageBillboard/ImageBillboardSet.js +86 -27
  113. package/dist/ImageBillboard/index.js +17 -1
  114. package/dist/ImageLink/ImageLink.d.ts +2 -2
  115. package/dist/ImageLink/ImageLink.js +30 -11
  116. package/dist/ImageLink/ImageLinkSet.js +14 -5
  117. package/dist/ImageLink/index.js +14 -5
  118. package/dist/Input/Checkbox.js +2 -1
  119. package/dist/Input/Input.css.d.ts +16 -16
  120. package/dist/Input/Input.js +2 -1
  121. package/dist/Input/PercentageInput.d.ts +3 -0
  122. package/dist/Input/PercentageInput.js +32 -0
  123. package/dist/Input/RadioButton.js +12 -3
  124. package/dist/Inputs/Input.css.d.ts +14 -14
  125. package/dist/Insight/Featured/CategorySelector.js +24 -17
  126. package/dist/Insight/Featured/Featured.css.d.ts +1 -0
  127. package/dist/Insight/Featured/Featured.css.js +5 -3
  128. package/dist/Insight/Featured/Featured.js +65 -49
  129. package/dist/Insight/Featured/Header.js +12 -3
  130. package/dist/Insight/Featured/index.js +2 -1
  131. package/dist/Insight/index.js +2 -1
  132. package/dist/Interstitial/Interstitial-variants.css.d.ts +2 -2
  133. package/dist/LandingPageHeader/LandingPageHeader.css.d.ts +3 -3
  134. package/dist/Modal/Modal.js +12 -3
  135. package/dist/NavigationMenu/AxosALTS/NavData.js +11 -2
  136. package/dist/NavigationMenu/AxosALTS/index.js +11 -2
  137. package/dist/NavigationMenu/AxosAdvisorServices/NavData.js +0 -5
  138. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileMenu.d.ts +2 -0
  139. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileMenu.js +345 -0
  140. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileMenu.module.js +53 -0
  141. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileNavData.d.ts +271 -0
  142. package/dist/NavigationMenu/AxosBank/MobileMenu/MobileNavData.js +660 -0
  143. package/dist/NavigationMenu/AxosBank/NavBar.module.js +39 -81
  144. package/dist/NavigationMenu/AxosBank/NavData.js +11 -2
  145. package/dist/NavigationMenu/AxosBank/SubNavBar.js +432 -123
  146. package/dist/NavigationMenu/AxosBank/index.d.ts +2 -1
  147. package/dist/NavigationMenu/AxosBank/index.js +101 -531
  148. package/dist/NavigationMenu/LaVictoire/NavData.js +12 -2
  149. package/dist/NavigationMenu/LaVictoire/index.js +48 -19
  150. package/dist/PageNavItem/PageNavItem.css.d.ts +2 -2
  151. package/dist/SetContainer/SetContainer.css.d.ts +17 -18
  152. package/dist/SetContainer/SetContainer.css.js +2 -4
  153. package/dist/SetContainer/SetContainer.d.ts +2 -1
  154. package/dist/SetContainer/SetContainer.js +25 -12
  155. package/dist/SetContainer/index.js +1 -2
  156. package/dist/SocialMediaBar/iconsRepository.js +11 -2
  157. package/dist/StepItem/StepItem.css.d.ts +18 -18
  158. package/dist/StepItemSet/StepItemSet.css.d.ts +14 -14
  159. package/dist/StepItemSet/StepItemSet.js +2 -14
  160. package/dist/Tab/Tab.css.d.ts +12 -12
  161. package/dist/Table/Table.css.d.ts +25 -25
  162. package/dist/Table/Table.d.ts +3 -3
  163. package/dist/Topic/Topic.css.d.ts +4 -0
  164. package/dist/Topic/Topic.css.js +12 -0
  165. package/dist/Topic/Topic.d.ts +19 -0
  166. package/dist/Topic/Topic.js +24 -0
  167. package/dist/Topic/index.d.ts +2 -0
  168. package/dist/Topic/index.js +12 -0
  169. package/dist/VideoWrapper/index.js +11 -2
  170. package/dist/WalnutIframe/index.d.ts +6 -0
  171. package/dist/WalnutIframe/index.js +21 -0
  172. package/dist/WalnutIframe/wrapper.module.js +14 -0
  173. package/dist/assets/Auth/ErrorAlert.css +37 -0
  174. package/dist/assets/Auth/SignIn.css +86 -0
  175. package/dist/assets/Button/Button.css +31 -16
  176. package/dist/assets/Calculators/AxosOneCalculator/BalanceAPYCalculator.css +5 -0
  177. package/dist/assets/Calculators/BuyDownCalculator/BuyDownCalculator.css +197 -0
  178. package/dist/assets/Calculators/SummitApyCalculator/BalanceAPYCalculator.css +8 -0
  179. package/dist/assets/CallToActionBar/CallToActionBar.css +32 -0
  180. package/dist/assets/Comparison/Comparison.css +9 -2
  181. package/dist/assets/HelpArticle/HelpArticle.css +70 -0
  182. package/dist/assets/HeroBanner/HeroBanner.css +26 -26
  183. package/dist/assets/HeroBanner/LargeBanner.css +3 -0
  184. package/dist/assets/IconBillboard/IconBillboard.css +22 -35
  185. package/dist/assets/ImageBillboard/ImageBillboard.css +317 -31
  186. package/dist/assets/Insight/Featured/Featured.css +21 -15
  187. package/dist/assets/Insight/Insight.css +12 -0
  188. package/dist/assets/NavigationMenu/AxosBank/MobileMenu/MobileMenu.css.css +191 -0
  189. package/dist/assets/NavigationMenu/AxosBank/NavBar.css +6 -0
  190. package/dist/assets/NavigationMenu/AxosBank/NavBar.css.css +114 -301
  191. package/dist/assets/SetContainer/SetContainer.css +44 -22
  192. package/dist/assets/Topic/Topic.css +54 -0
  193. package/dist/assets/WalnutIframe/wrapper.css.css +49 -0
  194. package/dist/assets/globals.css +14 -32
  195. package/dist/assets/utils/optimizeImage/optimizeImage.css.css +47 -0
  196. package/dist/icons/ArrowIcon/ArrowIcon.css.d.ts +3 -3
  197. package/dist/icons/CheckIcon/CheckIcon.css.d.ts +2 -2
  198. package/dist/main.d.ts +5 -0
  199. package/dist/main.js +61 -5
  200. package/dist/themes/axos.css.d.ts +38 -38
  201. package/dist/utils/allowedAxosDomains.js +19 -3
  202. package/dist/utils/appendQueryParams.js +3 -6
  203. package/dist/utils/optimizeImage/OptimizeImage.d.ts +11 -0
  204. package/dist/utils/optimizeImage/OptimizeImage.js +46 -0
  205. package/dist/utils/optimizeImage/index.d.ts +1 -0
  206. package/dist/utils/optimizeImage/index.js +4 -0
  207. package/dist/utils/optimizeImage/optimizeImage.module.js +14 -0
  208. package/package.json +11 -8
@@ -0,0 +1,855 @@
1
+ "use client";
2
+ import { jsxs, jsx } from "react/jsx-runtime";
3
+ import { zodResolver } from "@hookform/resolvers/zod";
4
+ import { Button } from "../../Button/Button.js";
5
+ import "../../Button/Button.css.js";
6
+ import { useState } from "react";
7
+ import "react-use";
8
+ import { Program, Fico, BuydownRate, BuydownTerm, LoanRates } from "../../Forms/FormEnums.js";
9
+ import { Checkbox } from "../../Input/Checkbox.js";
10
+ import { CurrencyInput } from "../../Input/CurrencyInput.js";
11
+ import { Dropdown } from "../../Input/Dropdown.js";
12
+ import "../../Input/Dropdown.css.js";
13
+ import { Input } from "../../Input/Input.js";
14
+ import "../../Input/Input.css.js";
15
+ import "../../Input/InputAmount.js";
16
+ import "../../Input/InputPhone.js";
17
+ import "../../Input/InputTextArea.js";
18
+ import "../../Input/DownPaymentInput.js";
19
+ import { RadioButtonSet, RadioButton } from "../../Input/RadioButton.js";
20
+ import { PercentageInput } from "../../Input/PercentageInput.js";
21
+ import "../../utils/allowedAxosDomains.js";
22
+ import { getVariant } from "../../utils/getVariant.js";
23
+ import clsx from "clsx";
24
+ import { useForm, FormProvider } from "react-hook-form";
25
+ import { z } from "zod";
26
+ import { calc_container, calculator_section, section_header, theme_header, mt_8, buydown_calculator_form, row_form, limit_one, calculate_row, form_wrapper, form_disclosure } from "./BuyDownCalculator.css.js";
27
+ const BuyDownCalculator = ({
28
+ header,
29
+ body,
30
+ disclosure,
31
+ variant
32
+ }) => {
33
+ const [loanRange, setLoanRange] = useState("");
34
+ const [financedAmount, setFinancedAmount] = useState("");
35
+ const [downPaymentPercentage, setDownPaymentPercentage] = useState("");
36
+ const [loanToValue, setLoanToValue] = useState("");
37
+ const [downPaymentQualifies, setDownPaymentQualifies] = useState("");
38
+ const [totalRateBuydown, setTotalRateBuydown] = useState("");
39
+ const [finalNoteRate, setFinalNoteRate] = useState("");
40
+ const [manuContributionPercentage, setManuContributionPercentage] = useState("");
41
+ const [buydownPayment, setBuydownPayment] = useState("");
42
+ const [manuContributionAmount, setManuContributionAmount] = useState("");
43
+ const [nonBuydownPayment, setNonBuydownPayment] = useState("");
44
+ const [totalBuydownCost, setTotalBuydownCost] = useState("");
45
+ const [monthlySavings, setMonthlySavings] = useState("");
46
+ const [dealerContributionAmount, setDealerContributionAmount] = useState("");
47
+ const [enableFullTimeCharter, setEnableFullTimeCharter] = useState(false);
48
+ const [disableMooringOutside, setDisableMooringOutside] = useState(false);
49
+ const [disableLTVAbove60, setDisableLTVAbove60] = useState(true);
50
+ const schema = z.object({
51
+ purchasePrice: z.string().min(1, { message: "Loan amount is required." }).transform((val) => {
52
+ return formatToNumber(val);
53
+ }),
54
+ downpayment: z.string().min(1, { message: "Down Payment is required." }).transform((val) => {
55
+ return formatToNumber(val);
56
+ }),
57
+ dealerContribution: z.string().min(1, { message: "Dealer Contribution is required." }).transform((val) => {
58
+ return formatToNumber(val);
59
+ }),
60
+ program: z.string().min(1, { message: "Program is required." }),
61
+ fico: z.string().min(1, { message: "FICO is required." }),
62
+ buydownRate: z.string().min(1, { message: "Buydown Rate is required." }).transform((val) => {
63
+ return formatToNumber(val);
64
+ }),
65
+ buydownTerm: z.string().min(1, { message: "Buydown Term is required." }).transform((val) => {
66
+ return formatToNumber(val);
67
+ })
68
+ }).superRefine((values, ctx) => {
69
+ const { purchasePrice, downpayment, program, buydownTerm } = values;
70
+ if (program === "3/6 SOFR ARM" && (buydownTerm === 4 || buydownTerm === 5)) {
71
+ ctx.addIssue({
72
+ code: z.ZodIssueCode.custom,
73
+ path: ["buydownTerm"],
74
+ message: "Max buydown terms is 3 years"
75
+ });
76
+ }
77
+ if (purchasePrice && downpayment) {
78
+ const financedAmount2 = purchasePrice - downpayment;
79
+ const range = getRange(financedAmount2);
80
+ const disableLTV = checkLTVStatus(downpayment, purchasePrice);
81
+ if (financedAmount2 < 0) {
82
+ ctx.addIssue({
83
+ code: z.ZodIssueCode.custom,
84
+ path: ["downpayment"],
85
+ message: "Down Payment should be lower than Purchase Price"
86
+ });
87
+ } else {
88
+ if (program) {
89
+ const loanRange2 = getRange(financedAmount2, program);
90
+ setLoanRange(loanRange2);
91
+ }
92
+ if (!disableLTV) {
93
+ setDisableLTVAbove60(false);
94
+ } else {
95
+ setDisableLTVAbove60(true);
96
+ }
97
+ }
98
+ if (updateFicoRequirements(range, program) === false) {
99
+ ctx.addIssue({
100
+ code: z.ZodIssueCode.custom,
101
+ path: ["fico"],
102
+ message: "Selected FICO is not within range for selected program."
103
+ });
104
+ }
105
+ }
106
+ });
107
+ const methods = useForm({
108
+ resolver: zodResolver(schema, {
109
+ async: true
110
+ }),
111
+ mode: "all"
112
+ });
113
+ const {
114
+ handleSubmit,
115
+ register,
116
+ setValue,
117
+ formState: { errors, isValid }
118
+ } = methods;
119
+ const calculator_variant = getVariant(variant);
120
+ const enableDependentInputs = enableFullTimeCharter;
121
+ const formatToNumber = (value) => {
122
+ const cleanValue = value.replace(/[%$, ]/gi, "");
123
+ return parseFloat(cleanValue);
124
+ };
125
+ const formatToCurrency = (value) => {
126
+ return value.toLocaleString("en-US", {
127
+ style: "currency",
128
+ currency: "USD",
129
+ minimumFractionDigits: 2,
130
+ maximumFractionDigits: 2
131
+ });
132
+ };
133
+ const formatToPercentage = (value) => {
134
+ return value.toLocaleString("en-US", {
135
+ minimumFractionDigits: 2,
136
+ maximumFractionDigits: 2
137
+ }) + "%";
138
+ };
139
+ const checkLTVStatus = (downpayment, purchasePrice) => {
140
+ const percentage = downpayment / purchasePrice * 100;
141
+ const loanToValue2 = 100 - percentage;
142
+ if (loanToValue2 <= 60) return false;
143
+ else return true;
144
+ };
145
+ const getRange = (financedAmount2, program, forRates) => {
146
+ let range = "";
147
+ if (forRates) {
148
+ if (financedAmount2 <= 1e5) {
149
+ range = "$75,000 ≤ $100,000";
150
+ } else if (financedAmount2 <= 15e4) {
151
+ range = "$100,001 ≤ $150,000";
152
+ } else if (financedAmount2 <= 25e4) {
153
+ range = "$150,001 ≤ $250,000";
154
+ } else if (financedAmount2 <= 5e5) {
155
+ range = "$250,001 ≤ $500,000";
156
+ } else if (financedAmount2 <= 15e5) {
157
+ range = "$500,001 ≤ $1,500,000";
158
+ } else if (financedAmount2 <= 2e6) {
159
+ range = "$1,500,001 ≤ $2,000,000";
160
+ } else if (financedAmount2 > 2e6) {
161
+ range = "> $2,000,000";
162
+ }
163
+ return range;
164
+ }
165
+ if (program) {
166
+ if (program?.includes("20")) {
167
+ if (financedAmount2 <= 15e4) {
168
+ range = "$75,000 ≤ $150,000";
169
+ } else if (financedAmount2 <= 25e4) {
170
+ range = "$150,001 ≤ $250,000";
171
+ } else if (financedAmount2 <= 5e5) {
172
+ range = "$250,001 ≤ $500,000";
173
+ } else if (financedAmount2 <= 15e5) {
174
+ range = "$500,001 ≤ $1,500,000";
175
+ } else if (financedAmount2 <= 2e6) {
176
+ range = "$1,500,001 ≤ $2,000,000";
177
+ } else if (financedAmount2 > 2e6) {
178
+ range = "> $2,000,000";
179
+ }
180
+ } else {
181
+ if (financedAmount2 <= 15e4) {
182
+ range = "$75,000 ≤ $150,000";
183
+ } else if (financedAmount2 <= 25e4) {
184
+ range = "$150,001 ≤ $250,000";
185
+ } else if (financedAmount2 <= 15e5) {
186
+ range = "$250,001 ≤ $1,500,000";
187
+ } else if (financedAmount2 <= 2e6) {
188
+ range = "$1,500,001 ≤ $2,000,000";
189
+ } else if (financedAmount2 > 2e6) {
190
+ range = "> $2,000,000";
191
+ }
192
+ }
193
+ } else {
194
+ if (financedAmount2 <= 15e4) {
195
+ range = "$75,000 ≤ $150,000";
196
+ } else if (financedAmount2 <= 25e4) {
197
+ range = "$150,001 ≤ $250,000";
198
+ } else if (financedAmount2 <= 5e5) {
199
+ range = "$250,001 ≤ $500,000";
200
+ } else if (financedAmount2 <= 15e5) {
201
+ range = "$500,001 ≤ $1,500,000";
202
+ } else if (financedAmount2 <= 2e6) {
203
+ range = "$1,500,001 ≤ $2,000,000";
204
+ } else if (financedAmount2 > 2e6) {
205
+ range = "> $2,000,000";
206
+ }
207
+ }
208
+ return range;
209
+ };
210
+ const handleProgramChange = (event) => {
211
+ const value = event.target.value;
212
+ if (value !== "20 Year Fixed Personal Use" && value !== "20 Year Fixed Limited Charter") {
213
+ setEnableFullTimeCharter(true);
214
+ setDisableMooringOutside(false);
215
+ if (value === "20 Year Fixed Full Time Charter") {
216
+ setValue("mooringOutsideContinentalUS", false);
217
+ setDisableMooringOutside(true);
218
+ }
219
+ } else {
220
+ setValue("mooringOutsideContinentalUS", false);
221
+ setValue("operatingAccount", false);
222
+ setValue("fullTimeCharter", false);
223
+ setEnableFullTimeCharter(false);
224
+ setDisableMooringOutside(true);
225
+ }
226
+ };
227
+ const updateFicoRequirements = (loanRangeValue, program) => {
228
+ const ficoOptionsToDisable = ["700-719", "720-759"];
229
+ const ficoSelect = document.getElementById("fico");
230
+ if ((program === "3/6 SOFR ARM" || program === "5/6 SOFR ARM") && loanRangeValue === "> $2,000,000") {
231
+ ficoOptionsToDisable.forEach((value) => {
232
+ const option = Array.from(ficoSelect.options).find(
233
+ (opt) => opt.value === value
234
+ );
235
+ if (option) {
236
+ option.disabled = true;
237
+ }
238
+ });
239
+ if (ficoOptionsToDisable.includes(ficoSelect.value)) {
240
+ setValue("fico", "760-799");
241
+ return false;
242
+ }
243
+ } else {
244
+ ficoOptionsToDisable.forEach((value) => {
245
+ const option = Array.from(ficoSelect.options).find(
246
+ (opt) => opt.value === value
247
+ );
248
+ if (option) {
249
+ option.disabled = false;
250
+ }
251
+ });
252
+ return true;
253
+ }
254
+ };
255
+ const calculateDownpaymentQualifies = (program, purchasePrice, downpayment) => {
256
+ let threshold, thresholdMessage;
257
+ if (program.includes("20 Year Fixed")) {
258
+ threshold = 0.2;
259
+ thresholdMessage = "20% Min Amount Needed";
260
+ } else {
261
+ threshold = 0.3;
262
+ thresholdMessage = "30% Min Amount Needed";
263
+ }
264
+ const percentage = downpayment / purchasePrice;
265
+ if (percentage >= threshold) {
266
+ setDownPaymentQualifies("Qualifies");
267
+ } else {
268
+ setDownPaymentQualifies(thresholdMessage);
269
+ }
270
+ };
271
+ const getInterestRate = (program, fico, loanRange2) => {
272
+ const programData = LoanRates.get(program);
273
+ if (!programData) {
274
+ return "Program not found";
275
+ }
276
+ const ficoData = programData.get(fico);
277
+ if (!ficoData) {
278
+ return "FICO range not found";
279
+ }
280
+ const rate = ficoData.get(loanRange2);
281
+ if (!rate) {
282
+ return "Loan range not found";
283
+ }
284
+ return rate;
285
+ };
286
+ const calculateAdjustments = () => {
287
+ let total = 0;
288
+ const checkboxes = document.querySelectorAll(
289
+ 'input[type="checkbox"]:checked, input[type="radio"]:checked'
290
+ );
291
+ checkboxes.forEach((checkbox) => {
292
+ total += parseFloat(checkbox.value);
293
+ });
294
+ return total;
295
+ };
296
+ const calculateRates = (program, fico, financedAmount2, buydownRate) => {
297
+ const minRate = 6.94;
298
+ const loanRange2 = getRange(financedAmount2, program, true);
299
+ const startingRate = parseFloat(
300
+ getInterestRate(program, fico, loanRange2).replace(/[%,]/g, "")
301
+ );
302
+ const rateAdjustments = calculateAdjustments();
303
+ const adjustedRate = startingRate + rateAdjustments;
304
+ const finalNoteRateValue = Math.max(minRate, adjustedRate);
305
+ const finalNoteRate2 = formatToPercentage(finalNoteRateValue);
306
+ const totalRateBuydownValue = finalNoteRateValue - buydownRate;
307
+ const totalRateBuydown2 = formatToPercentage(totalRateBuydownValue);
308
+ setFinalNoteRate(finalNoteRate2);
309
+ setTotalRateBuydown(totalRateBuydown2);
310
+ return finalNoteRateValue;
311
+ };
312
+ const calculateFinancedAmount = (purchasePrice, downpayment) => {
313
+ const financedAmount2 = purchasePrice - downpayment;
314
+ const downPaymentPercentage2 = downpayment / purchasePrice * 100;
315
+ const loanToValue2 = 100 - downPaymentPercentage2;
316
+ setFinancedAmount(formatToCurrency(financedAmount2));
317
+ setDownPaymentPercentage(formatToPercentage(downPaymentPercentage2));
318
+ setLoanToValue(formatToPercentage(loanToValue2));
319
+ return financedAmount2;
320
+ };
321
+ const calculateMonthlyPayment = (annualRate, years, principal) => {
322
+ const monthlyRate = annualRate / 12;
323
+ const numberOfPayments = years * 12;
324
+ const monthlyPayment = principal * (monthlyRate * Math.pow(1 + monthlyRate, numberOfPayments)) / (Math.pow(1 + monthlyRate, numberOfPayments) - 1);
325
+ return formatToCurrency(monthlyPayment);
326
+ };
327
+ const calculateBuydownPayment = (buydownRate, financedAmount2) => {
328
+ const buydownRateValue = buydownRate / 100;
329
+ const monthlyPayment = calculateMonthlyPayment(
330
+ buydownRateValue,
331
+ 20,
332
+ financedAmount2
333
+ );
334
+ setBuydownPayment(monthlyPayment);
335
+ return formatToNumber(monthlyPayment);
336
+ };
337
+ const calculateNonBuydownPayment = (finalNoteRate2, financedAmount2, buydownPayment2) => {
338
+ const rate = finalNoteRate2 / 100;
339
+ const nonBuydownPayment2 = calculateMonthlyPayment(rate, 20, financedAmount2);
340
+ const nonBuydownPaymentValue = formatToNumber(nonBuydownPayment2);
341
+ const monthlySavingsValue = nonBuydownPaymentValue - buydownPayment2;
342
+ setNonBuydownPayment(nonBuydownPayment2);
343
+ setMonthlySavings(formatToCurrency(monthlySavingsValue));
344
+ };
345
+ const calculatePMT = (annualRate, totalPeriods, financedAmount2) => {
346
+ const monthlyRate = annualRate / 100 / 12;
347
+ const payment = financedAmount2 * monthlyRate / (1 - Math.pow(1 + monthlyRate, -240));
348
+ return payment;
349
+ };
350
+ const totalInterestByYear = (annualRate, totalPeriods, financedAmount2, years) => {
351
+ const monthlyRate = annualRate / 100 / 12;
352
+ const payment = calculatePMT(annualRate, totalPeriods, financedAmount2);
353
+ let totalInterest = 0;
354
+ let balance = financedAmount2;
355
+ for (let month = 1; month <= years * 12; month++) {
356
+ const interestPayment = balance * monthlyRate;
357
+ totalInterest += interestPayment;
358
+ const principalPayment = payment - interestPayment;
359
+ balance -= principalPayment;
360
+ }
361
+ return totalInterest;
362
+ };
363
+ const calculateTBC = (years, buydownRateValue, financedAmout) => {
364
+ const totalPeriods = 20 * 12;
365
+ const after1Year = totalInterestByYear(
366
+ buydownRateValue,
367
+ totalPeriods,
368
+ financedAmout,
369
+ years
370
+ );
371
+ return after1Year;
372
+ };
373
+ const calculateBuydownCost = (finalNoteRate2, buydownRateValue, financedAmount2, buydownTerm) => {
374
+ const totalPeriods = 20 * 12;
375
+ const totalReg = totalInterestByYear(
376
+ finalNoteRate2,
377
+ totalPeriods,
378
+ financedAmount2,
379
+ buydownTerm
380
+ );
381
+ const totalBD = calculateTBC(buydownTerm, buydownRateValue, financedAmount2);
382
+ const TBC = totalReg - totalBD;
383
+ setTotalBuydownCost(formatToCurrency(TBC));
384
+ return TBC;
385
+ };
386
+ const calculateManufacturerContribution = (dealerContribution) => {
387
+ const manufacturerContribution = 100 - dealerContribution;
388
+ const percentage = formatToPercentage(manufacturerContribution);
389
+ setManuContributionPercentage(percentage);
390
+ return manufacturerContribution;
391
+ };
392
+ const calculateManufacturerAmount = (totalBuydownCost2, manufacturerContribution) => {
393
+ const manufacturerAmount = totalBuydownCost2 * (manufacturerContribution / 100);
394
+ const formattedAmount = formatToCurrency(manufacturerAmount);
395
+ setManuContributionAmount(formattedAmount);
396
+ };
397
+ const calculateDealerContributionAmount = (dealerContribution, totalBuydownCost2) => {
398
+ const dealerContributionValue = totalBuydownCost2 * (dealerContribution / 100);
399
+ const formattedAmount = formatToCurrency(dealerContributionValue);
400
+ setDealerContributionAmount(formattedAmount);
401
+ };
402
+ const onSubmit = (data) => {
403
+ if (isValid) {
404
+ const {
405
+ buydownRate,
406
+ buydownTerm,
407
+ dealerContribution,
408
+ downpayment,
409
+ fico,
410
+ program,
411
+ purchasePrice
412
+ } = data;
413
+ const financedAmountValue = calculateFinancedAmount(
414
+ purchasePrice,
415
+ downpayment
416
+ );
417
+ calculateDownpaymentQualifies(program, purchasePrice, downpayment);
418
+ const finalNoteRateValue = calculateRates(
419
+ program,
420
+ fico,
421
+ financedAmountValue,
422
+ buydownRate
423
+ );
424
+ const buydownPayment2 = calculateBuydownPayment(
425
+ buydownRate,
426
+ financedAmountValue
427
+ );
428
+ calculateNonBuydownPayment(
429
+ finalNoteRateValue,
430
+ financedAmountValue,
431
+ buydownPayment2
432
+ );
433
+ const totalBuydownCost2 = calculateBuydownCost(
434
+ finalNoteRateValue,
435
+ buydownRate,
436
+ financedAmountValue,
437
+ buydownTerm
438
+ );
439
+ const manufacturerContribution = calculateManufacturerContribution(dealerContribution);
440
+ calculateManufacturerAmount(totalBuydownCost2, manufacturerContribution);
441
+ calculateDealerContributionAmount(dealerContribution, totalBuydownCost2);
442
+ }
443
+ };
444
+ return /* @__PURE__ */ jsxs("section", { className: `${calc_container({ variant: calculator_variant })}`, children: [
445
+ /* @__PURE__ */ jsx("div", { className: `${calculator_section}`, children: (header || body) && /* @__PURE__ */ jsxs("div", { className: `${section_header}`, children: [
446
+ header && /* @__PURE__ */ jsx(
447
+ "h2",
448
+ {
449
+ className: `header_2 ${theme_header({ variant: calculator_variant })}`,
450
+ children: header
451
+ }
452
+ ),
453
+ body && /* @__PURE__ */ jsx("div", { className: mt_8, children: body })
454
+ ] }) }),
455
+ /* @__PURE__ */ jsx(FormProvider, { ...methods, children: /* @__PURE__ */ jsxs(
456
+ "form",
457
+ {
458
+ id: "calculator_form",
459
+ className: `${buydown_calculator_form}`,
460
+ onSubmit: handleSubmit(onSubmit),
461
+ children: [
462
+ /* @__PURE__ */ jsxs("div", { className: clsx(form_wrapper({ variant: calculator_variant })), children: [
463
+ /* @__PURE__ */ jsxs("div", { className: `${row_form}`, children: [
464
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
465
+ CurrencyInput,
466
+ {
467
+ id: "purchasePrice",
468
+ ...register("purchasePrice", { required: true }),
469
+ sizes: "medium",
470
+ placeholder: "$0.00",
471
+ label: "Purchase Price",
472
+ required: true,
473
+ error: !!errors["purchasePrice"],
474
+ helperText: errors["purchasePrice"]?.message,
475
+ variant: calculator_variant
476
+ }
477
+ ) }),
478
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
479
+ CurrencyInput,
480
+ {
481
+ id: "downpayment",
482
+ ...register("downpayment", { required: true }),
483
+ sizes: "medium",
484
+ placeholder: "$0.00",
485
+ label: "Down Payment",
486
+ required: true,
487
+ error: !!errors["downpayment"],
488
+ helperText: errors["downpayment"]?.message,
489
+ variant: calculator_variant
490
+ }
491
+ ) })
492
+ ] }),
493
+ /* @__PURE__ */ jsxs("div", { className: `${row_form}`, children: [
494
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
495
+ PercentageInput,
496
+ {
497
+ id: "dealerContribution",
498
+ ...register("dealerContribution", { required: true }),
499
+ sizes: "medium",
500
+ placeholder: "0.00%",
501
+ label: "Dealer Contribution",
502
+ required: true,
503
+ error: !!errors["dealerContribution"],
504
+ helperText: errors["dealerContribution"]?.message,
505
+ variant: calculator_variant
506
+ }
507
+ ) }),
508
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
509
+ Dropdown,
510
+ {
511
+ id: "program",
512
+ ...register("program", {
513
+ required: true,
514
+ deps: ["buydownTerm"]
515
+ }),
516
+ label: "Program",
517
+ sizes: "medium",
518
+ required: true,
519
+ error: !!errors.program,
520
+ helperText: errors.program?.message,
521
+ variant: calculator_variant,
522
+ defaultValue: "",
523
+ onChange: handleProgramChange,
524
+ children: [
525
+ /* @__PURE__ */ jsx("option", { value: "", disabled: true, children: "Select Program" }),
526
+ Program.map((item) => /* @__PURE__ */ jsx("option", { value: item.value, children: item.text }, item.value))
527
+ ]
528
+ }
529
+ ) })
530
+ ] }),
531
+ /* @__PURE__ */ jsxs("div", { className: `${row_form}`, children: [
532
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
533
+ Dropdown,
534
+ {
535
+ id: "fico",
536
+ ...register("fico", { required: true }),
537
+ label: "FICO",
538
+ sizes: "medium",
539
+ required: true,
540
+ error: !!errors["fico"],
541
+ helperText: errors["fico"]?.message,
542
+ variant: calculator_variant,
543
+ defaultValue: "",
544
+ children: [
545
+ /* @__PURE__ */ jsx("option", { value: "", disabled: true, children: "Select FICO" }),
546
+ Fico.map((item) => /* @__PURE__ */ jsx("option", { value: item.value, children: item.text }, item.value))
547
+ ]
548
+ }
549
+ ) }),
550
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
551
+ Input,
552
+ {
553
+ id: "loanRange",
554
+ sizes: "medium",
555
+ placeholder: "This value is calculated",
556
+ label: "Loan Range",
557
+ disabled: true,
558
+ variant: calculator_variant,
559
+ value: loanRange
560
+ }
561
+ ) })
562
+ ] }),
563
+ /* @__PURE__ */ jsxs("div", { className: `${row_form}`, children: [
564
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
565
+ Dropdown,
566
+ {
567
+ id: "buydownRate",
568
+ ...register("buydownRate", {
569
+ required: true
570
+ }),
571
+ label: "Buydown Rate",
572
+ sizes: "medium",
573
+ required: true,
574
+ error: !!errors.buydownRate,
575
+ helperText: errors.buydownRate?.message,
576
+ variant: calculator_variant,
577
+ defaultValue: "",
578
+ children: [
579
+ /* @__PURE__ */ jsx("option", { value: "", disabled: true, children: "Select Buydown Rate" }),
580
+ BuydownRate.map((item) => /* @__PURE__ */ jsx("option", { value: item.value, children: item.text }, item.value))
581
+ ]
582
+ }
583
+ ) }),
584
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
585
+ Dropdown,
586
+ {
587
+ id: "buydownTerm",
588
+ ...register("buydownTerm", {
589
+ required: true,
590
+ deps: ["program"]
591
+ }),
592
+ label: "Buydown Term (1-5 Years)",
593
+ sizes: "medium",
594
+ required: true,
595
+ error: !!errors.buydownTerm,
596
+ helperText: errors.buydownTerm?.message,
597
+ variant: calculator_variant,
598
+ defaultValue: 0,
599
+ children: [
600
+ /* @__PURE__ */ jsx("option", { value: "", disabled: true, children: "Select Buydown Term" }),
601
+ BuydownTerm.map((item) => /* @__PURE__ */ jsx("option", { value: item.value, children: item.text }, item.value))
602
+ ]
603
+ }
604
+ ) })
605
+ ] }),
606
+ /* @__PURE__ */ jsx("div", { className: `${row_form}`, children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("label", { children: "Loan Level Rate Adjustments" }) }) }),
607
+ /* @__PURE__ */ jsxs("div", { className: `${row_form}`, children: [
608
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("div", { className: row_form, children: /* @__PURE__ */ jsxs(
609
+ RadioButtonSet,
610
+ {
611
+ id: "dependentInputs",
612
+ label: "Limit One",
613
+ sizes: "medium",
614
+ variant,
615
+ direction: "column",
616
+ disabled: !enableDependentInputs,
617
+ className: limit_one,
618
+ children: [
619
+ /* @__PURE__ */ jsx(
620
+ RadioButton,
621
+ {
622
+ id: "mooringOutsideContinentalUS",
623
+ ...register("mooringOutsideContinentalUS"),
624
+ value: 0.5,
625
+ radioText: "Mooring Outside Continental U.S. (Includes Puerto Rico,\n Hawaii, and Alaska) (Does not apply to Full Time Charter)\n +0.500",
626
+ groupName: "dependentInputs",
627
+ disabled: disableMooringOutside
628
+ }
629
+ ),
630
+ /* @__PURE__ */ jsx(
631
+ RadioButton,
632
+ {
633
+ id: "operatingAccount",
634
+ ...register("operatingAccount"),
635
+ value: -0.25,
636
+ radioText: "Open and fund an LLC Operating Account with Axos - 0.25",
637
+ groupName: "dependentInputs"
638
+ }
639
+ )
640
+ ]
641
+ }
642
+ ) }) }),
643
+ /* @__PURE__ */ jsxs("div", { children: [
644
+ /* @__PURE__ */ jsx("div", { className: row_form, children: /* @__PURE__ */ jsx(
645
+ Checkbox,
646
+ {
647
+ id: "ltvAbove60",
648
+ ...register("ltvAbove60"),
649
+ sizes: "medium",
650
+ variant,
651
+ value: -0.35,
652
+ disabled: disableLTVAbove60,
653
+ children: "LTV ≤ 60% (If not required by program) -0.350"
654
+ }
655
+ ) }),
656
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
657
+ Checkbox,
658
+ {
659
+ id: "floorplanDealerIncentive",
660
+ ...register("floorplanDealerIncentive"),
661
+ sizes: "medium",
662
+ variant: calculator_variant,
663
+ value: -0.125,
664
+ children: "Floorplan dealer incentive -0.125"
665
+ }
666
+ ) }),
667
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
668
+ Checkbox,
669
+ {
670
+ id: "dealerCommercialDeposit",
671
+ ...register("dealerCommercialDeposit"),
672
+ sizes: "medium",
673
+ variant: calculator_variant,
674
+ value: -0.125,
675
+ children: "Dealer w/Commercial Deposit Relationship -0.125"
676
+ }
677
+ ) })
678
+ ] })
679
+ ] }),
680
+ /* @__PURE__ */ jsx("div", { className: calculate_row, children: /* @__PURE__ */ jsx(
681
+ Button,
682
+ {
683
+ color: getVariant(variant),
684
+ as: "button",
685
+ type: "submit",
686
+ disabled: !isValid,
687
+ children: "Calculate"
688
+ }
689
+ ) })
690
+ ] }),
691
+ /* @__PURE__ */ jsxs("div", { className: `${row_form}`, children: [
692
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
693
+ CurrencyInput,
694
+ {
695
+ id: "financedAmount",
696
+ sizes: "medium",
697
+ label: "Financed Amount",
698
+ disabled: true,
699
+ variant: calculator_variant,
700
+ value: financedAmount
701
+ }
702
+ ) }),
703
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
704
+ PercentageInput,
705
+ {
706
+ id: "downPaymentPercentage",
707
+ sizes: "medium",
708
+ label: "Down Payment %",
709
+ disabled: true,
710
+ variant: calculator_variant,
711
+ value: downPaymentPercentage
712
+ }
713
+ ) })
714
+ ] }),
715
+ /* @__PURE__ */ jsxs("div", { className: `${row_form}`, children: [
716
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
717
+ PercentageInput,
718
+ {
719
+ id: "loanToValue",
720
+ sizes: "medium",
721
+ label: "Loan to Value",
722
+ disabled: true,
723
+ variant: calculator_variant,
724
+ value: loanToValue
725
+ }
726
+ ) }),
727
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
728
+ Input,
729
+ {
730
+ id: "downPaymentQualifies",
731
+ sizes: "medium",
732
+ label: "Down Payment Qualifies",
733
+ disabled: true,
734
+ variant: calculator_variant,
735
+ value: downPaymentQualifies
736
+ }
737
+ ) })
738
+ ] }),
739
+ /* @__PURE__ */ jsxs("div", { className: `${row_form}`, children: [
740
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
741
+ PercentageInput,
742
+ {
743
+ id: "totalRateBuydown",
744
+ sizes: "medium",
745
+ label: "Total Rate Buydown",
746
+ disabled: true,
747
+ variant: calculator_variant,
748
+ value: totalRateBuydown
749
+ }
750
+ ) }),
751
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
752
+ PercentageInput,
753
+ {
754
+ id: "finalNoteRate",
755
+ sizes: "medium",
756
+ label: "Final Note Rate",
757
+ disabled: true,
758
+ variant: calculator_variant,
759
+ value: finalNoteRate
760
+ }
761
+ ) })
762
+ ] }),
763
+ /* @__PURE__ */ jsxs("div", { className: `${row_form}`, children: [
764
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
765
+ PercentageInput,
766
+ {
767
+ id: "manuContributionPercentage",
768
+ sizes: "medium",
769
+ label: "Manufacturer Contribution %",
770
+ disabled: true,
771
+ variant: calculator_variant,
772
+ value: manuContributionPercentage
773
+ }
774
+ ) }),
775
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
776
+ CurrencyInput,
777
+ {
778
+ id: "buydownPayment",
779
+ sizes: "medium",
780
+ label: "Buydown Payment",
781
+ disabled: true,
782
+ variant: calculator_variant,
783
+ value: buydownPayment
784
+ }
785
+ ) })
786
+ ] }),
787
+ /* @__PURE__ */ jsxs("div", { className: `${row_form}`, children: [
788
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
789
+ CurrencyInput,
790
+ {
791
+ id: "manuContributionAmount",
792
+ sizes: "medium",
793
+ label: "Manufacturer Contribution Amount",
794
+ disabled: true,
795
+ variant: calculator_variant,
796
+ value: manuContributionAmount
797
+ }
798
+ ) }),
799
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
800
+ CurrencyInput,
801
+ {
802
+ id: "nonBuydownPayment",
803
+ sizes: "medium",
804
+ label: "Non-buydown Payment",
805
+ disabled: true,
806
+ variant: calculator_variant,
807
+ value: nonBuydownPayment
808
+ }
809
+ ) })
810
+ ] }),
811
+ /* @__PURE__ */ jsxs("div", { className: `${row_form}`, children: [
812
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
813
+ CurrencyInput,
814
+ {
815
+ id: "totalBuydownCost",
816
+ sizes: "medium",
817
+ label: "Total Buydown Cost",
818
+ disabled: true,
819
+ variant: calculator_variant,
820
+ value: totalBuydownCost
821
+ }
822
+ ) }),
823
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
824
+ CurrencyInput,
825
+ {
826
+ id: "monthlySavings",
827
+ sizes: "medium",
828
+ label: "Monthly Savings",
829
+ disabled: true,
830
+ variant: calculator_variant,
831
+ value: monthlySavings
832
+ }
833
+ ) })
834
+ ] }),
835
+ /* @__PURE__ */ jsx("div", { className: `${row_form}`, children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
836
+ CurrencyInput,
837
+ {
838
+ id: "dealerContributionAmount",
839
+ sizes: "medium",
840
+ label: "Dealer Contribution Amount",
841
+ disabled: true,
842
+ variant: calculator_variant,
843
+ value: dealerContributionAmount,
844
+ helperText: "Dealer reserve offset not included in this amount."
845
+ }
846
+ ) }) })
847
+ ]
848
+ }
849
+ ) }),
850
+ disclosure && /* @__PURE__ */ jsx("div", { className: `${form_disclosure} push_up_24`, children: disclosure })
851
+ ] });
852
+ };
853
+ export {
854
+ BuyDownCalculator
855
+ };