@mychoice/mychoice-sdk-modules 2.2.15 → 2.2.16

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.
package/dist/cjs/index.js CHANGED
@@ -394,7 +394,7 @@ const VehicleOfferCoverages = ({ coverages, nonStandardCoverages, }) => {
394
394
  .map((o) => (jsxRuntime.jsx("div", { children: o.name }, o.value))) }))] }), jsxRuntime.jsx("td", { children: "Included" }), jsxRuntime.jsx("td", { children: getCoveragePremium('AB') })] }), jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { colSpan: 3, children: jsxRuntime.jsx("div", { className: "divider" }) }) }), jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsxs("td", { children: ["Uninsured Automobile Coverage", jsxRuntime.jsx("div", { style: { display: 'inline-block', marginLeft: '5px' }, children: jsxRuntime.jsx(mychoiceSdkComponents.TooltipForm, { id: "my-tooltip", description: 'Uninsured Motorist Coverage is a mandatory coverage which responds when you are not at-fault in an accident with an uninsured or unidentified (hit-and-run) vehicle, and have incurred bodily injuries, death, or damage to your property, and the offending vehicle owner cannot be found, of if identified, cannot adequately compensate you. Coverage is capped to match the province minimum liability limit of $200,000. Due to the low coverage value, it is highly recommended to ensure inclusion of the OPCF44 Family Protection Coverage endorsement for additional protection. Chat to your broker for more details about this coverage.' }) })] }), jsxRuntime.jsx("td", { children: "Included" }), jsxRuntime.jsx("td", { children: getCoveragePremium('UA') })] }), jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { colSpan: 3, children: jsxRuntime.jsx("div", { className: "divider" }) }) }), jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsxs("td", { children: ["Comprehensive Coverage", jsxRuntime.jsx("div", { style: { display: 'inline-block', marginLeft: '5px' }, children: jsxRuntime.jsx(mychoiceSdkComponents.TooltipForm, { id: "my-tooltip", description: 'Comprehensive coverage responds to types of damages ( repair or actual cash value payout) incurred by your vehicle when it is not actively being driven. Examples would be fire, theft, vandalism, glass breakage, and weather-related losses. While considered an optional coverage, it is highly recommended. Should your vehicle be financed or leased, the lienholder/lessor will not allow you to leave this coverage out and will impose a satisfactory deductible to meet their requirements.' }) })] }), jsxRuntime.jsx("td", { children: jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.coverageOptions, name: "comprehensive-coverage", onChange: handleComprehensiveChange, defaultValue: getSelectedOption(mychoiceSdkComponents.coverageOptions, comprehensive.coverage ? comprehensive.deductible : 0), title: "", description: "", placeholder: "Select from the list", autoSelectIfValueIsOutOfOptions: false, size: mychoiceSdkComponents.SizeTypes.Small, className: "coverages-select-input" }) }), jsxRuntime.jsx("td", { children: getCoveragePremium('CMP') })] }), jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { colSpan: 3, children: jsxRuntime.jsx("div", { className: "divider" }) }) }), jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsxs("td", { children: ["Collision Coverage", jsxRuntime.jsx("div", { style: { display: 'inline-block', marginLeft: '5px' }, children: jsxRuntime.jsx(mychoiceSdkComponents.TooltipForm, { id: "my-tooltip", description: 'Collision coverage responds to your vehicle damages (repair or actual cash value payout) in the event you collide with another vehicle or object in the course of its use or operation, and is determined to be at-fault. While considered an optional coverage, it is highly recommended. Should your vehicle be financed or leased, the lienholder/lessor will not allow you to leave this coverage out and will impose a satisfactory deductible to meet their requirements. Chat to your broker for more details about this coverage.' }) })] }), jsxRuntime.jsx("td", { children: jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.coverageOptions, name: "collision-coverage", onChange: handleCollisionChange, defaultValue: getSelectedOption(mychoiceSdkComponents.coverageOptions, collision.coverage ? collision.deductible : 0), title: "", description: "", placeholder: "Select from the list", autoSelectIfValueIsOutOfOptions: false, size: mychoiceSdkComponents.SizeTypes.Small, className: "coverages-select-input" }) }), jsxRuntime.jsx("td", { children: getCoveragePremium('COL') })] }), jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { colSpan: 3, children: jsxRuntime.jsx("div", { className: "divider" }) }) }), doesCoverageExist('5') && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsx("td", { children: "Permission to Rent or Lease (OPCF 5)" }), jsxRuntime.jsx("td", { children: "Included" }), jsxRuntime.jsx("td", { children: getCoveragePremium('5') })] }), jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { colSpan: 3, children: jsxRuntime.jsx("div", { className: "divider" }) }) })] })), isNonStandardCoverageActive(20) && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsxs("td", { children: ["Loss of Use (OPCF 20)", jsxRuntime.jsx("div", { style: { display: 'inline-block', marginLeft: '5px' }, children: jsxRuntime.jsx(mychoiceSdkComponents.TooltipForm, { id: "my-tooltip", description: 'The OPCF20 Loss of Use / Transportation Replacement endorsement responds when you are determined to be at-fault for an accident, or have a comprehensive claim, and need replacement transportation while your vehicle is out-of-service being repaired, or until it is deemed to be a total loss and a settlement offer is made by your insurer. Most often used to pay for a temporary replacement vehicle rental, it can also be used to compensate for other acceptable forms of travel. Depending on the insurer, the coverage limits available may be a dollar amount or a time amount, and you must have collision and comprehensive, or all perils coverage to include this endorsement. While it is optional, it is highly recommended, and careful consideration must be given to the coverage amounts chosen, as repair delays can quickly exhaust your policy limits, leaving you out-of-pocket for transportation expenses. Chat to your broker for more details about this coverage.' }) })] }), jsxRuntime.jsx("td", { style: { paddingBottom: '7px' }, children: jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.lossOfUseOptions, name: "loss-of-use", onChange: handleLossOfUseChange, defaultValue: getSelectedOption(mychoiceSdkComponents.lossOfUseOptions, lossofuse.coverage ? lossofuse.limit : 0), title: "", description: "", placeholder: "Select from the list", autoSelectIfValueIsOutOfOptions: false, size: mychoiceSdkComponents.SizeTypes.Small, className: "coverages-select-input" }) }), jsxRuntime.jsx("td", { rowSpan: doesCoverageExist('PAK6') ? 2 : 1, children: doesCoverageExist('PAK6') ? getCoveragePremium('PAK6') : getCoveragePremium('20') })] }) })), isNonStandardCoverageActive(27) && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsxs("td", { children: ["Liability for Damage for Non-Owned Cars (OPCF 27)", jsxRuntime.jsx("div", { style: { display: 'inline-block', marginLeft: '5px' }, children: jsxRuntime.jsx(mychoiceSdkComponents.TooltipForm, { id: "my-tooltip", description: 'The OPCF27 Liability for Damage to Non-Owned Automobile(s) endorsement responds when you rent or borrow a vehicle, and want to extend your coverages to that vehicle. Often used for special occasion rentals or vacation vehicle rentals. Full liability and physical damage coverages must be on your insured vehicle for this endorsement to apply, and a deductible is applicable. Careful consideration must be given in choosing a coverage amount that adequately covers the value of the vehicle you are expecting to rent or borrow. While considered optional, it is highly recommended, and often "packaged" with the OPCF20 Loss of Use / Transportation Replacement coverage by many insurers. Chat to your broker for more details about this coverage.' }) })] }), jsxRuntime.jsx("td", { children: jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.liabilityForDamageOptions, name: "liaiblity-for-damage", onChange: handleLiaiblityForDamageChange, defaultValue: getSelectedOption(mychoiceSdkComponents.liabilityForDamageOptions, liabilityfordamage.coverage ? liabilityfordamage.limit : 0), title: "", description: "", placeholder: "Select from the list", autoSelectIfValueIsOutOfOptions: false, size: mychoiceSdkComponents.SizeTypes.Small, className: "coverages-select-input" }) }), !doesCoverageExist('PAK6') && jsxRuntime.jsx("td", { children: getCoveragePremium('27') })] }), jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { colSpan: 3, children: jsxRuntime.jsx("div", { className: "divider" }) }) })] })), isNonStandardCoverageActive('aCCW') && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsxs("td", { children: ["Accident Waiver or Forgiveness (OPCF 39)", jsxRuntime.jsx("div", { style: { display: 'inline-block', marginLeft: '5px' }, children: jsxRuntime.jsx(mychoiceSdkComponents.TooltipForm, { id: "my-tooltip", description: "The OPCF39 Accident Waiver/Forgiveness endorsement responds by protecting your existing driving record from being negatively impacted by a single, partial at-fault or fully at-fault accident, and must be on the policy before the accident. The benefit of the coverage continues as long as you stay with the same insurer, as it's not transferable should you move to another insurance company. Subsequent at-fault or partial at-fault accidents will not have the protection and will be adversely rated accordingly. Eligibility, terms, conditions, and formulations used can vary significantly between insurers, so careful review and consideration are essential. While purchasing this endorsement is optional, it is highly recommended as the alternative of being accident-rated for several years will be significantly higher in premiums than the cost of the endorsement. Chat to your broker for more details about this coverage." }) })] }), jsxRuntime.jsx("td", { children: "Included" }), jsxRuntime.jsx("td", { children: getCoveragePremium('ACCW') })] }), jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { colSpan: 3, children: jsxRuntime.jsx("div", { className: "divider" }) }) })] })), isNonStandardCoverageActive(43) && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsxs("td", { children: ["Limited waiver of depreciation (OPCF ", isLeased ? '43A' : '43', ")", jsxRuntime.jsx("div", { style: { display: 'inline-block', marginLeft: '5px' }, children: jsxRuntime.jsx(mychoiceSdkComponents.TooltipForm, { id: "my-tooltip", description: 'The OPCF43/43A Removing Depreciation Deduction / Limited Waiver of Depreciation endorsement responds by protecting your original purchase/lease price of a "new" vehicle (as evidenced by a bill of sale or lease agreement) from depreciation should the vehicle be a total loss from an insured peril. Only new vehicles, and in some cases "demo\'s" with limited mileage are eligible, and the endorsement must be added immediately upon the vehicle delivery. Coverage durations available vary between insurers, generally ranging from 24 months to 60 months from the possession date of the vehicle. While an optional coverage, it is highly recommended as, without it, a total loss settlement based on actual cash value could leave you contractually owing money to a lienholder or lessor. Chat to your broker for more details about this coverage.' }) })] }), jsxRuntime.jsx("td", { children: jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.limitedWaiverOfDepreciationOptions, name: "liaiblity-for-damage", onChange: handleLimitedWaiverOfDepreciationChange, defaultValue: getSelectedOption(mychoiceSdkComponents.limitedWaiverOfDepreciationOptions, limitedwaiverofdepreciation.coverage ? limitedwaiverofdepreciation.limit : 0), title: "", description: "", placeholder: "Select from the list", autoSelectIfValueIsOutOfOptions: false, size: mychoiceSdkComponents.SizeTypes.Small, className: "coverages-select-input" }) }), jsxRuntime.jsx("td", { children: getCoveragePremium('43') })] }), jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { colSpan: 3, children: jsxRuntime.jsx("div", { className: "divider" }) }) })] })), jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsxs("td", { children: ["Family Protection (OPCF 44)", jsxRuntime.jsx("div", { style: { display: 'inline-block', marginLeft: '5px' }, children: jsxRuntime.jsx(mychoiceSdkComponents.TooltipForm, { id: "my-tooltip", description: 'The OPCF44 Family Protection Endorsement responds when you are determined to be not at-fault in a vehicle accident, and your claim / civil suit against the offending vehicle owner is not adequately satisfied as they are unidentified, uninsured, or underinsured. This endorsement bridges their coverages (if any) up to the full limits of the OPCF44 coverage on your policy. While considered an optional coverage, it is highly recommended as a form of self protection, and is extremely low in cost. Chat to your broker for more details about this coverage.' }) })] }), jsxRuntime.jsx("td", { children: "Included" }), jsxRuntime.jsx("td", { children: getCoveragePremium('44') })] }), jsxRuntime.jsx("tr", { children: jsxRuntime.jsx("td", { colSpan: 3, children: jsxRuntime.jsx("div", { className: "divider" }) }) }), jsxRuntime.jsxs("tr", { className: "premium-total", children: [jsxRuntime.jsx("td", { children: "Annual Premium" }), jsxRuntime.jsx("td", {}), jsxRuntime.jsx("td", { children: getSumOfPremiums() })] })] }) }), jsxRuntime.jsx("div", { style: { display: 'flex', flexDirection: 'column' }, children: jsxRuntime.jsx(BlockSubmit$2, { className: "mychoice recalculate", label: "Recalculate Quote", buttonSize: mychoiceSdkComponents.SizeTypes.Medium, isRecalc: true }) })] }));
395
395
  };
396
396
 
397
- const OfferSection = ({ offerCompany, brokerCompany, offerPrice, phoneNumber, isBestOffer, isFirstOffer = true, operationHours = {}, redirectUrl, fulfillmentUrl, coverages, nonStandardCoverages, brokerIntegration, }) => {
397
+ const OfferSection = ({ offerCompany, brokerCompany, offerPrice, phoneNumber, isBestOffer, isFirstOffer = true, operationHours = {}, redirectUrl, fulfillmentUrl, coverages, nonStandardCoverages, brokerIntegration, showRecalculateCta = false, onRecalculateClick, }) => {
398
398
  const { appConfigState: { appType, insuranceType }, } = mychoiceSdkStore.useStoreAppConfig();
399
399
  // Get discount states for broker phone
400
400
  const { discountState: carDiscountState } = mychoiceSdkStore.useStoreFormCarDiscount();
@@ -439,7 +439,7 @@ const OfferSection = ({ offerCompany, brokerCompany, offerPrice, phoneNumber, is
439
439
  };
440
440
  const isHubIntegration = brokerIntegration?.type === 'hub';
441
441
  const isDCWIntegration = brokerIntegration?.type === 'dcw';
442
- return (jsxRuntime.jsxs("div", { className: `offer-section ${mychoiceCls}`, children: [shouldShowBrokerInfo && isMyChoice && (isTheBig || !offsiteUrl) && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(mychoiceSdkComponents.OfferDetail, { className: isTheBig ? 'thebig-bold' : '', logo: brokerCompany?.logo, name: brokerCompany?.title, companyType: mychoiceSdkComponents.CompanyRoleTypes.Broker, description: brokerCompany?.description, isBestOffer: isBestOffer, isMyChoice: isMyChoice }), jsxRuntime.jsx("hr", { style: {
442
+ return (jsxRuntime.jsxs("div", { className: `offer-section ${mychoiceCls}${showRecalculateCta ? ' recalc-pending' : ''}`, children: [shouldShowBrokerInfo && isMyChoice && (isTheBig || !offsiteUrl) && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(mychoiceSdkComponents.OfferDetail, { className: isTheBig ? 'thebig-bold' : '', logo: brokerCompany?.logo, name: brokerCompany?.title, companyType: mychoiceSdkComponents.CompanyRoleTypes.Broker, description: brokerCompany?.description, isBestOffer: isBestOffer, isMyChoice: isMyChoice }), jsxRuntime.jsx("hr", { style: {
443
443
  margin: '0',
444
444
  padding: '0',
445
445
  width: '100%',
@@ -451,7 +451,7 @@ const OfferSection = ({ offerCompany, brokerCompany, offerPrice, phoneNumber, is
451
451
  width: '100%',
452
452
  height: '1px',
453
453
  backgroundColor: '$color-background-header-primary',
454
- } })] })), !isHubIntegration && !isDCWIntegration && (jsxRuntime.jsx(mychoiceSdkComponents.OfferHeader, { className: isTheBig ? 'thebig-bold' : '', companyName: offerCompany?.name, isBestOffer: isBestOffer, isMyChoice: isMyChoice })), !isHubIntegration && !isDCWIntegration && (jsxRuntime.jsx(mychoiceSdkComponents.OfferPrice, { className: isTheBig ? 'thebig' : '', companyLogo: offerCompany?.logo, price: offerPrice })), (isHubIntegration || isDCWIntegration) && (jsxRuntime.jsx("div", { className: "offer-phone noprice-integration", children: jsxRuntime.jsx("div", { className: "noprice-message-container", children: jsxRuntime.jsxs("p", { className: "noprice-description", children: [jsxRuntime.jsx("span", { children: brokerIntegration?.data?.label }), jsxRuntime.jsx("br", {}), brokerIntegration?.data?.description] }) }) })), brokerIntegration?.type === 'youset' && brokerIntegration?.data?.url && (jsxRuntime.jsxs("div", { className: "offer-phone", children: [jsxRuntime.jsx("h3", { children: brokerIntegration?.data?.description || 'Click below to view your YouSet offer' }), jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { className: `offer-phone-number ${mychoiceCls}`, label: brokerIntegration?.data?.label || 'View Offer', type: mychoiceSdkComponents.ButtonTypes.Button, category: mychoiceSdkComponents.CategoryTypes.Filled, color: mychoiceSdkComponents.ColorTypes.Primary, variant: mychoiceSdkComponents.ButtonVariantTypes.Rectangle, size: mychoiceSdkComponents.SizeTypes.Medium, onClick: () => window.open(brokerIntegration.data.url, '_blank') })] })), !brokerIntegration && !isTheBig && offsiteUrl && (jsxRuntime.jsxs("div", { className: "offer-phone", children: [jsxRuntime.jsx("h3", { children: "Click below to get this rate" }), jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { className: `offer-phone-number ${mychoiceCls}`, label: "Buy Online", type: mychoiceSdkComponents.ButtonTypes.Button, category: mychoiceSdkComponents.CategoryTypes.Filled, color: mychoiceSdkComponents.ColorTypes.Primary, variant: mychoiceSdkComponents.ButtonVariantTypes.Rectangle, size: mychoiceSdkComponents.SizeTypes.Medium, onClick: handleCTAClick })] })), !brokerIntegration && (isTheBig || !offsiteUrl) && (jsxRuntime.jsxs("div", { className: "offer-phone", children: [jsxRuntime.jsx("h3", { className: isTheBig ? 'thebig-bold' : '', children: "Call now to get this rate" }), jsxRuntime.jsx("a", { target: "_blank", rel: "noreferrer noopener", href: `tel:${effectivePhoneNumber?.number}`, children: jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { className: `${isTheBig ? 'thebig-bold' : 'mychoice'} offer-phone-number`, label: effectivePhoneNumber?.title, type: mychoiceSdkComponents.ButtonTypes.Button, category: mychoiceSdkComponents.CategoryTypes.Filled, color: mychoiceSdkComponents.ColorTypes.Primary, variant: mychoiceSdkComponents.ButtonVariantTypes.Rectangle, size: mychoiceSdkComponents.SizeTypes.Medium }) })] })), jsxRuntime.jsxs("button", { className: "dropdown", onClick: handleDropdownClick, children: [jsxRuntime.jsx("span", { children: detailsIsOpen ? 'Less Info' : 'More Info' }), jsxRuntime.jsx(mychoiceSdkComponents.IconDropdownArrow, { color: "grey", className: detailsIsOpen ? 'rotated' : '' })] }), detailsIsOpen && (jsxRuntime.jsxs("div", { className: "offer-details", children: [!isHubIntegration && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(mychoiceSdkComponents.OfferDetail, { className: isTheBig ? 'thebig-bold' : '', name: offerCompany?.name, companyType: mychoiceSdkComponents.CompanyRoleTypes.Offering, description: offerCompany?.description, isBestOffer: !isMyChoice ? isBestOffer : false, isMyChoice: isMyChoice }), !isMyChoice && jsxRuntime.jsx("hr", {})] })), !isMyChoice && (isTheBig || !offsiteUrl) && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(mychoiceSdkComponents.OfferDetail, { className: isTheBig ? 'thebig-bold' : '', logo: brokerCompany?.logo, name: brokerCompany?.title, companyType: mychoiceSdkComponents.CompanyRoleTypes.Broker, description: brokerCompany?.description, isMyChoice: isMyChoice }), jsxRuntime.jsx("hr", {})] })), !isMyChoice && (jsxRuntime.jsx(mychoiceSdkComponents.OfferDetail, { className: isTheBig ? 'thebig-bold' : '', name: "Hours of Operation", isMyChoice: isMyChoice, children: jsxRuntime.jsx(mychoiceSdkComponents.OperationHoursInfo, { weekdayHours: weekdayHours, saturdayHours: saturdayHours, sundayHours: sundayHours }) })), isMyChoice && coverages && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("hr", {}), jsxRuntime.jsx(VehicleOfferCoverages, { coverages: coverages, nonStandardCoverages: nonStandardCoverages })] }))] }))] }));
454
+ } })] })), !isHubIntegration && !isDCWIntegration && (jsxRuntime.jsx(mychoiceSdkComponents.OfferHeader, { className: isTheBig ? 'thebig-bold' : '', companyName: offerCompany?.name, isBestOffer: isBestOffer, isMyChoice: isMyChoice })), !isHubIntegration && !isDCWIntegration && (jsxRuntime.jsx(mychoiceSdkComponents.OfferPrice, { className: isTheBig ? 'thebig' : '', companyLogo: offerCompany?.logo, price: offerPrice })), (isHubIntegration || isDCWIntegration) && (jsxRuntime.jsx("div", { className: "offer-phone noprice-integration", children: jsxRuntime.jsx("div", { className: "noprice-message-container", children: jsxRuntime.jsxs("p", { className: "noprice-description", children: [jsxRuntime.jsx("span", { children: brokerIntegration?.data?.label }), jsxRuntime.jsx("br", {}), brokerIntegration?.data?.description] }) }) })), brokerIntegration?.type === 'youset' && brokerIntegration?.data?.url && (jsxRuntime.jsxs("div", { className: "offer-phone", children: [jsxRuntime.jsx("h3", { children: brokerIntegration?.data?.description || 'Click below to view your YouSet offer' }), jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { className: `offer-phone-number ${mychoiceCls}`, label: brokerIntegration?.data?.label || 'View Offer', type: mychoiceSdkComponents.ButtonTypes.Button, category: mychoiceSdkComponents.CategoryTypes.Filled, color: mychoiceSdkComponents.ColorTypes.Primary, variant: mychoiceSdkComponents.ButtonVariantTypes.Rectangle, size: mychoiceSdkComponents.SizeTypes.Medium, onClick: () => window.open(brokerIntegration.data.url, '_blank') })] })), !brokerIntegration && !isTheBig && offsiteUrl && (jsxRuntime.jsxs("div", { className: "offer-phone", children: [jsxRuntime.jsx("h3", { children: "Click below to get this rate" }), jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { className: `offer-phone-number ${mychoiceCls}`, label: "Buy Online", type: mychoiceSdkComponents.ButtonTypes.Button, category: mychoiceSdkComponents.CategoryTypes.Filled, color: mychoiceSdkComponents.ColorTypes.Primary, variant: mychoiceSdkComponents.ButtonVariantTypes.Rectangle, size: mychoiceSdkComponents.SizeTypes.Medium, onClick: handleCTAClick })] })), !brokerIntegration && (isTheBig || !offsiteUrl) && (jsxRuntime.jsxs("div", { className: "offer-phone", children: [jsxRuntime.jsx("h3", { className: isTheBig ? 'thebig-bold' : '', children: showRecalculateCta ? 'Your premium requires recalculation' : 'Call now to get this rate' }), showRecalculateCta ? (jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { className: `${isTheBig ? 'thebig-bold' : 'mychoice'} offer-phone-number`, label: "Recalculate Quote", type: mychoiceSdkComponents.ButtonTypes.Button, category: mychoiceSdkComponents.CategoryTypes.Filled, color: mychoiceSdkComponents.ColorTypes.Primary, variant: mychoiceSdkComponents.ButtonVariantTypes.Rectangle, size: mychoiceSdkComponents.SizeTypes.Medium, onClick: onRecalculateClick })) : (jsxRuntime.jsx("a", { target: "_blank", rel: "noreferrer noopener", href: `tel:${effectivePhoneNumber?.number}`, children: jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { className: `${isTheBig ? 'thebig-bold' : 'mychoice'} offer-phone-number`, label: effectivePhoneNumber?.title, type: mychoiceSdkComponents.ButtonTypes.Button, category: mychoiceSdkComponents.CategoryTypes.Filled, color: mychoiceSdkComponents.ColorTypes.Primary, variant: mychoiceSdkComponents.ButtonVariantTypes.Rectangle, size: mychoiceSdkComponents.SizeTypes.Medium }) }))] })), jsxRuntime.jsxs("button", { className: "dropdown", onClick: handleDropdownClick, children: [jsxRuntime.jsx("span", { children: detailsIsOpen ? 'Less Info' : 'More Info' }), jsxRuntime.jsx(mychoiceSdkComponents.IconDropdownArrow, { color: "grey", className: detailsIsOpen ? 'rotated' : '' })] }), detailsIsOpen && (jsxRuntime.jsxs("div", { className: "offer-details", children: [!isHubIntegration && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(mychoiceSdkComponents.OfferDetail, { className: isTheBig ? 'thebig-bold' : '', name: offerCompany?.name, companyType: mychoiceSdkComponents.CompanyRoleTypes.Offering, description: offerCompany?.description, isBestOffer: !isMyChoice ? isBestOffer : false, isMyChoice: isMyChoice }), !isMyChoice && jsxRuntime.jsx("hr", {})] })), !isMyChoice && (isTheBig || !offsiteUrl) && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(mychoiceSdkComponents.OfferDetail, { className: isTheBig ? 'thebig-bold' : '', logo: brokerCompany?.logo, name: brokerCompany?.title, companyType: mychoiceSdkComponents.CompanyRoleTypes.Broker, description: brokerCompany?.description, isMyChoice: isMyChoice }), jsxRuntime.jsx("hr", {})] })), !isMyChoice && (jsxRuntime.jsx(mychoiceSdkComponents.OfferDetail, { className: isTheBig ? 'thebig-bold' : '', name: "Hours of Operation", isMyChoice: isMyChoice, children: jsxRuntime.jsx(mychoiceSdkComponents.OperationHoursInfo, { weekdayHours: weekdayHours, saturdayHours: saturdayHours, sundayHours: sundayHours }) })), isMyChoice && coverages && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("hr", {}), jsxRuntime.jsx(VehicleOfferCoverages, { coverages: coverages, nonStandardCoverages: nonStandardCoverages })] }))] }))] }));
455
455
  };
456
456
  OfferSection.defaultProps = {
457
457
  offerPrice: { monthly: 0, yearly: 0 },
@@ -892,7 +892,7 @@ const AccidentBenefitsModal = ({ selectedCoverages, onApply, onCancel, }) => {
892
892
  setLocalSelected([...allValues]);
893
893
  }
894
894
  };
895
- return (jsxRuntime.jsx("div", { className: "ab-modal-overlay", onClick: onCancel, children: jsxRuntime.jsxs("div", { className: "ab-modal", onClick: (e) => e.stopPropagation(), children: [jsxRuntime.jsxs("div", { className: "ab-modal-header", children: [jsxRuntime.jsx("h3", { children: "Accident Benefits" }), jsxRuntime.jsx("p", { className: "ab-modal-subtitle", children: "Standard Coverage + Self-Selected Optional Enhancements" }), jsxRuntime.jsx("p", { className: "ab-modal-body-text", children: "Base coverage with flexibility to select additional benefits" })] }), jsxRuntime.jsxs("div", { className: "ab-modal-content", children: [jsxRuntime.jsxs("div", { className: "ab-modal-standard-block", children: [jsxRuntime.jsx("h4", { children: "Standard Benefits" }), jsxRuntime.jsx("p", { className: "ab-modal-standard-subtitle", children: "Medical, Rehabilitation, and Attendant Care" }), jsxRuntime.jsx("p", { className: "ab-modal-standard-description", children: "Covers medical expenses, therapy and personal care for injuries from an accident, including doctor visits and physiotherapy." })] }), jsxRuntime.jsxs("div", { className: "ab-modal-optional-block", children: [jsxRuntime.jsxs("div", { className: "ab-modal-minimum-notice", children: [jsxRuntime.jsx("strong", { children: "Minimum Limits Apply" }), jsxRuntime.jsx("p", { children: "All optional benefits selected below will be quoted at their minimum coverage limits. Please speak with your broker if you wish to discuss higher limits." })] }), jsxRuntime.jsxs("label", { className: "ab-modal-select-all", children: [jsxRuntime.jsx("input", { type: "checkbox", checked: allSelected, onChange: handleSelectAll }), jsxRuntime.jsx("span", { children: "Select All" })] }), jsxRuntime.jsx("div", { className: "ab-modal-options", children: mychoiceSdkComponents.accidentBenefitsOptionalOptions.map((option) => (jsxRuntime.jsxs("label", { className: "ab-modal-option", children: [jsxRuntime.jsx("input", { type: "checkbox", checked: localSelected.includes(option.value), onChange: () => handleToggle(option.value) }), jsxRuntime.jsxs("div", { className: "ab-modal-option-text", children: [jsxRuntime.jsx("strong", { children: option.name }), jsxRuntime.jsx("span", { children: option.description })] })] }, option.value))) })] })] }), jsxRuntime.jsxs("div", { className: "ab-modal-actions", children: [jsxRuntime.jsx("button", { type: "button", className: "ab-modal-btn ab-modal-btn-cancel", onClick: onCancel, children: "Cancel" }), jsxRuntime.jsx("button", { type: "button", className: "ab-modal-btn ab-modal-btn-apply", onClick: () => onApply(localSelected), children: "Apply" })] })] }) }));
895
+ return (jsxRuntime.jsx("div", { className: "ab-modal-overlay", onClick: onCancel, children: jsxRuntime.jsxs("div", { className: "ab-modal", onClick: (e) => e.stopPropagation(), children: [jsxRuntime.jsxs("div", { className: "ab-modal-header", children: [jsxRuntime.jsx("h3", { children: "Accident Benefits" }), jsxRuntime.jsx("p", { className: "ab-modal-subtitle", children: "Standard Coverage + Self-Selected Optional Enhancements" }), jsxRuntime.jsx("p", { className: "ab-modal-body-text", children: "Base coverage with flexibility to select additional benefits" })] }), jsxRuntime.jsxs("div", { className: "ab-modal-content", children: [jsxRuntime.jsxs("div", { className: "ab-modal-standard-block ab-modal-standard-block--included", children: [jsxRuntime.jsxs("div", { className: "ab-modal-standard-included-header", children: [jsxRuntime.jsx("input", { type: "checkbox", checked: true, disabled: true, readOnly: true, className: "ab-modal-standard-locked-checkbox" }), jsxRuntime.jsx("h4", { children: "Standard Benefits \u2014 Included" })] }), jsxRuntime.jsx("p", { className: "ab-modal-standard-subtitle", children: "Medical, Rehabilitation, and Attendant Care" }), jsxRuntime.jsx("p", { className: "ab-modal-standard-description", children: "Covers medical expenses, therapy and personal care for injuries from an accident, including doctor visits and physiotherapy." })] }), jsxRuntime.jsxs("div", { className: "ab-modal-optional-block", children: [jsxRuntime.jsxs("label", { className: "ab-modal-select-all", children: [jsxRuntime.jsx("input", { type: "checkbox", checked: allSelected, onChange: handleSelectAll }), jsxRuntime.jsx("span", { children: "Select All Additional Benefits" })] }), jsxRuntime.jsx("div", { className: "ab-modal-options", children: mychoiceSdkComponents.accidentBenefitsOptionalOptions.map((option) => (jsxRuntime.jsxs("label", { className: "ab-modal-option", children: [jsxRuntime.jsx("input", { type: "checkbox", checked: localSelected.includes(option.value), onChange: () => handleToggle(option.value) }), jsxRuntime.jsxs("div", { className: "ab-modal-option-text", children: [jsxRuntime.jsx("strong", { children: option.name }), jsxRuntime.jsx("span", { children: option.description })] })] }, option.value))) }), jsxRuntime.jsxs("div", { className: "ab-modal-minimum-notice", children: [jsxRuntime.jsx("strong", { children: "Minimum Limits Apply" }), jsxRuntime.jsx("p", { children: "All optional benefits selected below will be quoted at their minimum coverage limits. Please speak with your broker if you wish to discuss higher limits." })] })] })] }), jsxRuntime.jsxs("div", { className: "ab-modal-actions", children: [jsxRuntime.jsx("button", { type: "button", className: "ab-modal-btn ab-modal-btn-cancel", onClick: onCancel, children: "Cancel" }), jsxRuntime.jsx("button", { type: "button", className: "ab-modal-btn ab-modal-btn-apply", onClick: () => onApply(localSelected), children: "Apply" })] })] }) }));
896
896
  };
897
897
 
898
898
  const VehicleSectionAccidentBenefits = () => {
@@ -927,7 +927,7 @@ const VehicleSectionAccidentBenefits = () => {
927
927
  setModalOpen(false);
928
928
  };
929
929
  const hasError = !accidentbenefits.abAcknowledged && vehicleState.inValidation;
930
- return (jsxRuntime.jsxs("div", { id: "abAcknowledged", className: `form-section ab-section ${mychoiceCls}`, children: [jsxRuntime.jsxs("div", { className: "ab-notice-banner", children: [jsxRuntime.jsx("strong", { children: "Important Notice \u2013 Accident Benefits Changes (Effective July 1, 2026)" }), jsxRuntime.jsx("p", { children: "As of July 1, 2026, significant changes have been made to the Accident Benefits coverage in Ontario. Many benefits that were previously included are now optional and must be selected based on your individual needs." })] }), jsxRuntime.jsxs("div", { className: `ab-option-selector${hasError ? ' ab-option-selector--error' : ''}`, role: "button", tabIndex: 0, onClick: () => setModalOpen(true), onKeyDown: (e) => e.key === 'Enter' && setModalOpen(true), children: [jsxRuntime.jsxs("div", { className: "ab-option-selector-content", children: [jsxRuntime.jsx("strong", { children: "Standard Mandatory Accident Benefits + Self-Selected Optional Enhancements" }), jsxRuntime.jsx("p", { children: "Base coverage with flexibility to select additional benefits" }), jsxRuntime.jsx("p", { className: "ab-option-selector-hint", children: "Selecting this option will open a window displaying all available optional Accident Benefits, which you may individually select based on your needs. Each selected benefit will be quoted at its minimum limit." })] }), jsxRuntime.jsx("span", { className: "ab-option-selector-arrow", children: "\u203A" })] }), modalOpen && (jsxRuntime.jsx(AccidentBenefitsModal, { selectedCoverages: accidentbenefits.additionalCoverages, onApply: handleApply, onCancel: () => setModalOpen(false) }))] }));
930
+ return (jsxRuntime.jsxs("div", { id: "abAcknowledged", className: `form-section ab-section ${mychoiceCls}`, children: [jsxRuntime.jsxs("div", { className: "ab-notice-banner", children: [jsxRuntime.jsx("strong", { children: "Changes to Your Accident Benefits Selections (Effective July 1, 2026)" }), jsxRuntime.jsx("p", { children: "As of July 1, 2026, significant changes have been made to the Accident Benefits coverage in Ontario. Many benefits that were previously included are now optional and must be selected based on your individual needs." })] }), jsxRuntime.jsxs("div", { className: `ab-option-selector${hasError ? ' ab-option-selector--error' : ''}`, role: "button", tabIndex: 0, onClick: () => setModalOpen(true), onKeyDown: (e) => e.key === 'Enter' && setModalOpen(true), children: [jsxRuntime.jsxs("div", { className: "ab-option-selector-content", children: [jsxRuntime.jsx("strong", { children: "Standard Mandatory Accident Benefits + Self-Selected Optional Enhancements" }), jsxRuntime.jsx("p", { children: "Base coverage with flexibility to select additional benefits" }), jsxRuntime.jsx("p", { className: "ab-option-selector-hint", children: "Selecting this option will open a window displaying all available optional Accident Benefits, which you may individually select based on your needs. Each selected benefit will be quoted at its minimum limit." })] }), jsxRuntime.jsx("span", { className: "ab-option-selector-arrow", children: "\u203A" })] }), modalOpen && (jsxRuntime.jsx(AccidentBenefitsModal, { selectedCoverages: accidentbenefits.additionalCoverages, onApply: handleApply, onCancel: () => setModalOpen(false) }))] }));
931
931
  };
932
932
 
933
933
  const VehicleSectionCoverage = () => {
@@ -2054,10 +2054,15 @@ const SectionQuoteRecalc$1 = () => {
2054
2054
  const [isRecalcSubmitted, setIsRecalcSubmitted] = React.useState(false);
2055
2055
  const { vehicleState, dispatchVehicleState } = mychoiceSdkStore.useStoreFormCarVehicle();
2056
2056
  const { quoteState } = mychoiceSdkStore.useStoreFormCarQuote();
2057
- const { comprehensive, collision, liability, accidentbenefits } = vehicleState.items[vehicleState.activeIndex];
2057
+ const { comprehensive, collision, liability, accidentbenefits, } = vehicleState.items[vehicleState.activeIndex];
2058
2058
  const { isAbReformActive } = mychoiceSdkStore.useAbReform();
2059
2059
  const recalcInitiatedRef = React.useRef(false);
2060
2060
  const prevRequestDateRef = React.useRef(quoteState.requestDate);
2061
+ const [modalOpen, setModalOpen] = React.useState(false);
2062
+ const [abPendingRecalc, setAbPendingRecalc] = React.useState(false);
2063
+ const emitAbPendingRecalc = (value) => {
2064
+ window.dispatchEvent(new CustomEvent('ab-pending-recalc-change', { detail: value }));
2065
+ };
2061
2066
  React.useEffect(() => {
2062
2067
  if (recalcInitiatedRef.current
2063
2068
  && quoteState.requestDate
@@ -2067,6 +2072,16 @@ const SectionQuoteRecalc$1 = () => {
2067
2072
  prevRequestDateRef.current = quoteState.requestDate;
2068
2073
  }
2069
2074
  }, [quoteState.requestDate]);
2075
+ React.useEffect(() => {
2076
+ const handlePendingChange = (event) => {
2077
+ const customEvent = event;
2078
+ setAbPendingRecalc(Boolean(customEvent.detail));
2079
+ };
2080
+ window.addEventListener('ab-pending-recalc-change', handlePendingChange);
2081
+ return () => {
2082
+ window.removeEventListener('ab-pending-recalc-change', handlePendingChange);
2083
+ };
2084
+ }, []);
2070
2085
  const hasAbChanges = accidentbenefits.baseCoverage !== 'minimum_required'
2071
2086
  || accidentbenefits.additionalCoverages.length > 0;
2072
2087
  const handleComprehensiveChange = ({ value }) => {
@@ -2087,7 +2102,6 @@ const SectionQuoteRecalc$1 = () => {
2087
2102
  payload: { coverage: true, limit: value },
2088
2103
  });
2089
2104
  };
2090
- const [modalOpen, setModalOpen] = React.useState(false);
2091
2105
  const handleModalApply = (selected) => {
2092
2106
  dispatchVehicleState({
2093
2107
  type: mychoiceSdkStore.StoreFormCarVehicleActionTypes.FormCarAccidentBenefitsAdditionalCoveragesSet,
@@ -2105,16 +2119,23 @@ const SectionQuoteRecalc$1 = () => {
2105
2119
  payload: { baseCoverage: 'minimum_required' },
2106
2120
  });
2107
2121
  }
2122
+ setAbPendingRecalc(true);
2123
+ emitAbPendingRecalc(true);
2124
+ setIsRecalcSubmitted(false);
2108
2125
  setModalOpen(false);
2109
2126
  };
2110
- return (jsxRuntime.jsxs("div", { className: "form-container", children: [jsxRuntime.jsx(TabVehicle, { readOnly: true }), jsxRuntime.jsxs("div", { className: `form-section edit-recalc-container ${mychoiceCls}`, children: [jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.coverageOptions, name: "comprehensive-coverage", onChange: handleComprehensiveChange, defaultValue: getSelectedOption(mychoiceSdkComponents.coverageOptions, comprehensive.coverage ? comprehensive.deductible : 0), title: "Comprehensive coverage", description: "This deductible is the amount of money that you will pay out of your own pocket if your vehicle is damaged in events not covered by collision coverage. This includes events such as falling or flying objects, vandalism, and theft. Your insurance company covers the cost of repair minus the deductible chosen.", placeholder: "Select from the list", autoSelectIfValueIsOutOfOptions: false }), jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.coverageOptions, name: "collision-coverage", onChange: handleCollisionChange, defaultValue: getSelectedOption(mychoiceSdkComponents.coverageOptions, collision.coverage ? collision.deductible : 0), title: "Collision coverage", description: "This deductible is the specific dollar amount you will pay out of your own pocket if your vehicle is damaged in an accident. Your insurance company covers the remaining amount.", placeholder: "Select from the list", autoSelectIfValueIsOutOfOptions: false }), jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.liabilityOptions, name: "liability-limit", onChange: handleLiabilityChange, defaultValue: getSelectedOption(mychoiceSdkComponents.liabilityOptions, liability.coverage ? liability.limit : 1000000), title: "Third Party Liability", description: "This protects you from lawsuits resulting from accidents causing bodily injury or death to others or property damage.", placeholder: "Select from the list", autoSelectIfValueIsOutOfOptions: false }), isAbReformActive && isTheBig && (jsxRuntime.jsxs("div", { className: "accident-benefits-container", children: [jsxRuntime.jsxs("div", { className: "ab-notice-banner", children: [jsxRuntime.jsx("strong", { children: "Important Notice \u2013 Accident Benefits Changes (Effective July 1, 2026)" }), jsxRuntime.jsx("p", { children: "As of July 1, 2026, significant changes have been made to the Accident Benefits coverage in Ontario. Many benefits that were previously included are now optional and must be selected based on your individual needs." })] }), jsxRuntime.jsxs("div", { className: "ab-option-selector", onClick: () => setModalOpen(true), children: [jsxRuntime.jsxs("div", { className: "ab-option-selector-content", children: [jsxRuntime.jsx("strong", { children: "Standard Mandatory Accident Benefits + Self-Selected Optional Enhancements" }), jsxRuntime.jsx("p", { children: "Base coverage with flexibility to select additional benefits" })] }), jsxRuntime.jsx("span", { className: "ab-option-selector-arrow", children: "\u203A" })] }), modalOpen && (jsxRuntime.jsx(AccidentBenefitsModal, { selectedCoverages: accidentbenefits.additionalCoverages, onApply: handleModalApply, onCancel: () => setModalOpen(false) }))] })), jsxRuntime.jsx(BlockSubmit$2, { className: `${isTheBig ? 'thebig-bold' : 'mychoice'} recalculate`, label: "Recalculate Quote", buttonSize: mychoiceSdkComponents.SizeTypes.Medium, isRecalc: true, onSubmitClick: () => {
2127
+ let recalcMessage = 'We could not calculate a premium for the selected Accident Benefits options. Please speak to your broker to review the implications of these changes.';
2128
+ if (quoteState.items?.length) {
2129
+ recalcMessage = hasAbChanges
2130
+ ? 'Your premium has been recalculated. Your broker has been notified and will contact you to discuss your Accident Benefits selections.'
2131
+ : 'Your premium has been recalculated.';
2132
+ }
2133
+ return (jsxRuntime.jsxs("div", { className: "form-container", children: [jsxRuntime.jsx(TabVehicle, { readOnly: true }), jsxRuntime.jsxs("div", { className: `form-section edit-recalc-container ${mychoiceCls}`, children: [jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.coverageOptions, name: "comprehensive-coverage", onChange: handleComprehensiveChange, defaultValue: getSelectedOption(mychoiceSdkComponents.coverageOptions, comprehensive.coverage ? comprehensive.deductible : 0), title: "Comprehensive coverage", description: "This deductible is the amount of money that you will pay out of your own pocket if your vehicle is damaged in events not covered by collision coverage. This includes events such as falling or flying objects, vandalism, and theft. Your insurance company covers the cost of repair minus the deductible chosen.", placeholder: "Select from the list", autoSelectIfValueIsOutOfOptions: false }), jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.coverageOptions, name: "collision-coverage", onChange: handleCollisionChange, defaultValue: getSelectedOption(mychoiceSdkComponents.coverageOptions, collision.coverage ? collision.deductible : 0), title: "Collision coverage", description: "This deductible is the specific dollar amount you will pay out of your own pocket if your vehicle is damaged in an accident. Your insurance company covers the remaining amount.", placeholder: "Select from the list", autoSelectIfValueIsOutOfOptions: false }), jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.liabilityOptions, name: "liability-limit", onChange: handleLiabilityChange, defaultValue: getSelectedOption(mychoiceSdkComponents.liabilityOptions, liability.coverage ? liability.limit : 1000000), title: "Third Party Liability", description: "This protects you from lawsuits resulting from accidents causing bodily injury or death to others or property damage.", placeholder: "Select from the list", autoSelectIfValueIsOutOfOptions: false }), isAbReformActive && isTheBig && (jsxRuntime.jsxs("div", { className: "accident-benefits-container", children: [jsxRuntime.jsxs("div", { className: "ab-notice-banner", children: [jsxRuntime.jsx("strong", { children: "Changes to Your Accident Benefits Selections (Effective July 1, 2026)" }), jsxRuntime.jsx("p", { children: "As of July 1, 2026, significant changes have been made to the Accident Benefits coverage in Ontario. Many benefits that were previously included are now optional and must be selected based on your individual needs." })] }), jsxRuntime.jsxs("div", { className: "ab-option-selector", role: "button", tabIndex: 0, onClick: () => setModalOpen(true), onKeyDown: (event) => event.key === 'Enter' && setModalOpen(true), children: [jsxRuntime.jsxs("div", { className: "ab-option-selector-content", children: [jsxRuntime.jsx("strong", { children: "Standard Mandatory Accident Benefits + Self-Selected Optional Enhancements" }), jsxRuntime.jsx("p", { children: "Base coverage with flexibility to select additional benefits" })] }), jsxRuntime.jsx("span", { className: "ab-option-selector-arrow", children: "\u203A" })] }), modalOpen && (jsxRuntime.jsx(AccidentBenefitsModal, { selectedCoverages: accidentbenefits.additionalCoverages, onApply: handleModalApply, onCancel: () => setModalOpen(false) }))] })), isAbReformActive && isTheBig && abPendingRecalc && !isRecalcSubmitted && (jsxRuntime.jsx("p", { className: "accident-benefits-recalc-pending", children: "Your Accident Benefits selections have been updated. Click Recalculate to update your premium." })), jsxRuntime.jsx(BlockSubmit$2, { className: `${isTheBig ? 'thebig-bold' : 'mychoice'} recalculate`, label: "Recalculate Quote", buttonSize: mychoiceSdkComponents.SizeTypes.Medium, isRecalc: true, onSubmitClick: () => {
2111
2134
  recalcInitiatedRef.current = true;
2135
+ setAbPendingRecalc(false);
2136
+ emitAbPendingRecalc(false);
2112
2137
  setIsRecalcSubmitted(false);
2113
- } }), isAbReformActive && isTheBig && isRecalcSubmitted && (jsxRuntime.jsx("p", { className: "accident-benefits-recalc-message", children: quoteState.items?.length
2114
- ? hasAbChanges
2115
- ? 'Your premium has been recalculated. Your broker has been notified and will contact you to discuss your Accident Benefits selections.'
2116
- : 'Your premium has been recalculated.'
2117
- : 'We could not calculate a premium for the selected Accident Benefits options. Please speak to your broker to review the implications of these changes.' })), isTheBig ? jsxRuntime.jsx(BlockEndorsements, {}) : jsxRuntime.jsx(BlockMCEndorsements, {})] })] }));
2138
+ } }), isAbReformActive && isTheBig && isRecalcSubmitted && (jsxRuntime.jsx("p", { className: "accident-benefits-recalc-message", children: recalcMessage })), isTheBig ? jsxRuntime.jsx(BlockEndorsements, {}) : jsxRuntime.jsx(BlockMCEndorsements, {})] })] }));
2118
2139
  };
2119
2140
 
2120
2141
  const lockEmoji$1 = '\u{1F512}';
@@ -2201,6 +2222,9 @@ const PageCarQuote = () => {
2201
2222
  const showContentWhileLoading = hasConfirmStep ? true : !appLoaderState.isOpen;
2202
2223
  const navigate = reactRouterDom.useNavigate();
2203
2224
  const [recalcFailed, setRecalcFailed] = React.useState(false);
2225
+ const [abPendingRecalc, setAbPendingRecalc] = React.useState(false);
2226
+ const showAbRecalculateCta = abPendingRecalc && isTheBig;
2227
+ const shouldGreyOutOffers = recalcFailed && !showAbRecalculateCta;
2204
2228
  const prevRequestDateRef = React.useRef(undefined);
2205
2229
  const lastSuccessfulItemsRef = React.useRef(undefined);
2206
2230
  if (items?.length) {
@@ -2211,6 +2235,16 @@ const PageCarQuote = () => {
2211
2235
  const displayItems = recalcFailed
2212
2236
  ? (hasConfirmStep ? lastSuccessfulItems?.slice(0, 2) : lastSuccessfulItems)
2213
2237
  : quoteItems;
2238
+ React.useEffect(() => {
2239
+ const handlePendingChange = (event) => {
2240
+ const customEvent = event;
2241
+ setAbPendingRecalc(Boolean(customEvent.detail));
2242
+ };
2243
+ window.addEventListener('ab-pending-recalc-change', handlePendingChange);
2244
+ return () => {
2245
+ window.removeEventListener('ab-pending-recalc-change', handlePendingChange);
2246
+ };
2247
+ }, []);
2214
2248
  React.useEffect(() => {
2215
2249
  if (!quoteState.requestDate)
2216
2250
  return;
@@ -2220,9 +2254,15 @@ const PageCarQuote = () => {
2220
2254
  }
2221
2255
  if (quoteState.requestDate !== prevRequestDateRef.current) {
2222
2256
  setRecalcFailed(!quoteState.items?.length);
2257
+ setAbPendingRecalc(false);
2223
2258
  prevRequestDateRef.current = quoteState.requestDate;
2224
2259
  }
2225
2260
  }, [quoteState.requestDate]);
2261
+ const handleRecalculateClick = () => {
2262
+ setAbPendingRecalc(false);
2263
+ window.dispatchEvent(new CustomEvent('ab-pending-recalc-change', { detail: false }));
2264
+ postRequestQuote(true, quoteConfirm);
2265
+ };
2226
2266
  mychoiceSdkComponents.useEffectOnce(() => {
2227
2267
  if (!vehicleFormIsValid) {
2228
2268
  vehicleFormValidate();
@@ -2244,14 +2284,14 @@ const PageCarQuote = () => {
2244
2284
  navigate(`/${localIndex || mychoiceSdkComponents.defaultLocalIndex}/${insuranceType}/offer`);
2245
2285
  }
2246
2286
  });
2247
- return (jsxRuntime.jsx("div", { className: `quote-page-content ${hasConfirmStep ? 'confirm-step' : ''}`, children: showContentWhileLoading && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [hasConfirmStep && jsxRuntime.jsx(BlockConfirmHeading, {}), jsxRuntime.jsxs("div", { className: "form-section-container", children: [appDeviceType === mychoiceSdkComponents.DeviceTypes.Mobile && !hasConfirmStep && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: !!(items?.length || recalcFailed) ? (jsxRuntime.jsx(jsxRuntime.Fragment, { children: !quoteState.showCallMessage ? (jsxRuntime.jsx("div", { className: `offer-container${recalcFailed ? ' greyed-out' : ''}`, children: jsxRuntime.jsx(OfferSection, { isBestOffer: true, offerCompany: displayBestItem?.company, brokerCompany: displayBestItem?.brokerProfile, offerPrice: {
2287
+ return (jsxRuntime.jsx("div", { className: `quote-page-content ${hasConfirmStep ? 'confirm-step' : ''}`, children: showContentWhileLoading && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [hasConfirmStep && jsxRuntime.jsx(BlockConfirmHeading, {}), jsxRuntime.jsxs("div", { className: "form-section-container", children: [appDeviceType === mychoiceSdkComponents.DeviceTypes.Mobile && !hasConfirmStep && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: !!(items?.length || recalcFailed) ? (jsxRuntime.jsx(jsxRuntime.Fragment, { children: !quoteState.showCallMessage ? (jsxRuntime.jsx("div", { className: `offer-container${shouldGreyOutOffers ? ' greyed-out' : ''}`, children: jsxRuntime.jsx(OfferSection, { isBestOffer: true, offerCompany: displayBestItem?.company, brokerCompany: displayBestItem?.brokerProfile, offerPrice: {
2248
2288
  monthly: displayBestItem?.priceMonthly,
2249
2289
  yearly: displayBestItem?.priceYearly,
2250
2290
  }, operationHours: {
2251
2291
  saturdayHours: displayBestItem?.brokerProfile.hoursSaturday,
2252
2292
  sundayHours: displayBestItem?.brokerProfile.hoursSunday,
2253
2293
  weekdayHours: displayBestItem?.brokerProfile.hoursWorkdays,
2254
- }, phoneNumber: formatPhoneObject(displayBestItem?.brokerProfile.phone ?? ''), redirectUrl: displayBestItem?.brokerProfile.redirectUrl || '', coverages: displayBestItem?.coverages, nonStandardCoverages: displayBestItem?.nonStandardCoverages, brokerIntegration: displayBestItem?.brokerIntegration }) })) : (jsxRuntime.jsx(SplashScreen$2, {})) })) : (jsxRuntime.jsx(NoQuotesMessage, { type: "car" })) })), (!hasConfirmStep || appDeviceType !== mychoiceSdkComponents.DeviceTypes.Mobile) && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SectionQuoteEdit$2, {}), (isTheBig || !items[0]?.coverages) && jsxRuntime.jsx(SectionQuoteRecalc$1, {})] }))] }), appDeviceType !== mychoiceSdkComponents.DeviceTypes.Mobile && quoteState.showCallMessage && jsxRuntime.jsx(SplashScreen$2, {}), !quoteState.showCallMessage && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("div", { style: { position: 'relative', width: '100%' }, children: [isAbReformActive && isTheBig && (jsxRuntime.jsxs("div", { className: "ab-disclaimer", children: [jsxRuntime.jsx("strong", { children: "Important Disclaimer" }), jsxRuntime.jsxs("p", { children: ["Due to the changes to the Statutory Accident Benefit Coverage, effective July 1, 2026", ' ', jsxRuntime.jsx("a", { href: "https://www.fsrao.ca/industry/auto-insurance/changes-statutory-accident-benefits-coverage-ontario-july-1-2026#:~:text=July%201%2C%202026-,Changes%20in%20Statutory%20Accident%20Benefits%20coverage%20in%20Ontario%20on%20July,fits%20their%20needs%20and%20budgets.", target: "_blank", rel: "noreferrer noopener", children: "(Government of Ontario website)" }), ", please consider the individual circumstances for all drivers quoted before making your selections. Speak with your insurance broker if you have questions or need help understanding your options. Your Accident Benefits coverage selections will impact both your quoted premium and the coverage available to drivers on the quote."] })] })), hasConfirmStep && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: "offer-container", children: jsxRuntime.jsx(SectionConfirm, {}) }), appDeviceType === mychoiceSdkComponents.DeviceTypes.Mobile && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SectionQuoteEdit$2, {}), (isTheBig || !items[0]?.coverages) && jsxRuntime.jsx(SectionQuoteRecalc$1, {})] }))] })), jsxRuntime.jsx("div", { className: `offer-container ${hasConfirmStep ? 'blur' : ''} ${recalcFailed ? 'greyed-out' : ''}`, children: !!(items?.length || recalcFailed) ? ((displayItems ?? []).map(({ company, brokerProfile, priceMonthly, priceYearly, coverages, nonStandardCoverages, brokerIntegration, }, index) => (jsxRuntime.jsx("div", { children: (appDeviceType !== mychoiceSdkComponents.DeviceTypes.Mobile ||
2294
+ }, phoneNumber: formatPhoneObject(displayBestItem?.brokerProfile.phone ?? ''), redirectUrl: displayBestItem?.brokerProfile.redirectUrl || '', coverages: displayBestItem?.coverages, nonStandardCoverages: displayBestItem?.nonStandardCoverages, brokerIntegration: displayBestItem?.brokerIntegration, showRecalculateCta: showAbRecalculateCta, onRecalculateClick: handleRecalculateClick }) })) : (jsxRuntime.jsx(SplashScreen$2, {})) })) : (jsxRuntime.jsx(NoQuotesMessage, { type: "car" })) })), (!hasConfirmStep || appDeviceType !== mychoiceSdkComponents.DeviceTypes.Mobile) && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SectionQuoteEdit$2, {}), (isTheBig || !items[0]?.coverages) && jsxRuntime.jsx(SectionQuoteRecalc$1, {})] }))] }), appDeviceType !== mychoiceSdkComponents.DeviceTypes.Mobile && quoteState.showCallMessage && jsxRuntime.jsx(SplashScreen$2, {}), !quoteState.showCallMessage && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("div", { style: { position: 'relative', width: '100%' }, children: [isAbReformActive && isTheBig && (jsxRuntime.jsxs("div", { className: "ab-disclaimer", children: [jsxRuntime.jsx("strong", { children: "Important Disclaimer" }), jsxRuntime.jsxs("p", { children: ["Due to the changes to the Statutory Accident Benefit Coverage, effective July 1, 2026", ' ', jsxRuntime.jsx("a", { href: "https://www.fsrao.ca/industry/auto-insurance/changes-statutory-accident-benefits-coverage-ontario-july-1-2026#:~:text=July%201%2C%202026-,Changes%20in%20Statutory%20Accident%20Benefits%20coverage%20in%20Ontario%20on%20July,fits%20their%20needs%20and%20budgets.", target: "_blank", rel: "noreferrer noopener", children: "(Government of Ontario website)" }), ", please consider the individual circumstances for all drivers quoted before making your selections. Speak with your insurance broker if you have questions or need help understanding your options. Your Accident Benefits coverage selections will impact both your quoted premium and the coverage available to drivers on the quote."] })] })), hasConfirmStep && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: "offer-container", children: jsxRuntime.jsx(SectionConfirm, {}) }), appDeviceType === mychoiceSdkComponents.DeviceTypes.Mobile && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SectionQuoteEdit$2, {}), (isTheBig || !items[0]?.coverages) && jsxRuntime.jsx(SectionQuoteRecalc$1, {})] }))] })), jsxRuntime.jsx("div", { className: `offer-container ${hasConfirmStep ? 'blur' : ''} ${shouldGreyOutOffers ? 'greyed-out' : ''}`, children: !!(items?.length || recalcFailed) ? ((displayItems ?? []).map(({ company, brokerProfile, priceMonthly, priceYearly, coverages, nonStandardCoverages, brokerIntegration, }, index) => (jsxRuntime.jsx("div", { children: (appDeviceType !== mychoiceSdkComponents.DeviceTypes.Mobile ||
2255
2295
  (appDeviceType === mychoiceSdkComponents.DeviceTypes.Mobile && index !== 0)) && (jsxRuntime.jsx(OfferSection, { isBestOffer: index === 0, isFirstOffer: index === 0, offerCompany: company, brokerCompany: brokerProfile, offerPrice: {
2256
2296
  monthly: priceMonthly,
2257
2297
  yearly: priceYearly,
@@ -2259,7 +2299,7 @@ const PageCarQuote = () => {
2259
2299
  saturdayHours: brokerProfile.hoursSaturday,
2260
2300
  sundayHours: brokerProfile.hoursSunday,
2261
2301
  weekdayHours: brokerProfile.hoursWorkdays,
2262
- }, phoneNumber: formatPhoneObject(brokerProfile.phone), redirectUrl: brokerProfile.redirectUrl || '', coverages: coverages, nonStandardCoverages: nonStandardCoverages, brokerIntegration: brokerIntegration })) }, index)))) : (jsxRuntime.jsx(NoQuotesMessage, { type: "car" })) })] }) }))] })) }));
2302
+ }, phoneNumber: formatPhoneObject(brokerProfile.phone), redirectUrl: brokerProfile.redirectUrl || '', coverages: coverages, nonStandardCoverages: nonStandardCoverages, brokerIntegration: brokerIntegration, showRecalculateCta: showAbRecalculateCta, onRecalculateClick: handleRecalculateClick })) }, index)))) : (jsxRuntime.jsx(NoQuotesMessage, { type: "car" })) }), isAbReformActive && isTheBig && (jsxRuntime.jsx("div", { className: "quote-expiry-disclaimer", children: "The information provided through this quote is for indicative purposes only and is based on the details submitted. Quotes are subject to change, may expire, and are not guaranteed or binding. Final premiums, coverage, and eligibility are determined by the insurer upon full review and underwriting. Please speak with your broker to confirm all details and secure binding coverage." }))] }) }))] })) }));
2263
2303
  };
2264
2304
 
2265
2305
  const IndicatorsContainer = () => jsxRuntime.jsx(jsxRuntime.Fragment, {});