import{r as e,h as t}from"./p-1a7a8b00.js";import{X as s,Y as i}from"./p-19cd3f24.js";const r=class{constructor(t){e(this,t),this.annualPrice=void 0,this.downpayment=void 0,this.installments=void 0,this.monthlyPrice=void 0,this.useExternal=!1,this._annualPrice=void 0,this._downpayment=void 0,this._monthlyPrice=void 0}resetState(){}componentWillLoad(){this.useExternal=!!customElements.get("bp-sdk-external-quote-request-premium-monthly"),customElements.whenDefined("bp-sdk-external-quote-request-premium-monthly").then((()=>{this.useExternal=!0})),this.onMonthlyPriceChange(this.monthlyPrice),this.onAnnualPriceChange(this.annualPrice),this.onDownpaymentChange(this.downpayment)}onAnnualPriceChange(e){this._annualPrice=s(e)}onDownpaymentChange(e){this._downpayment=s(e)}onMonthlyPriceChange(e){this._monthlyPrice=s(e)}render(){return[this.useExternal&&this.renderExternal(),!this.useExternal&&this.renderInternal()]}renderExternal(){return t("bp-sdk-external-quote-request-premium-monthly",{annualPrice:this.annualPrice,downpayment:this.downpayment,installments:this.installments,monthlyPrice:this.monthlyPrice})}renderInternal(){return t("div",{class:"bp-sdk-quote-request-premium-monthly__container"},t("div",null,t("p",{class:"bp-sdk-online-quote__price-main bp-sdk-quote__price-main"},t("bp-sdk-quote-request-premium-payment",{period:"mo",price:this.monthlyPrice,showObelus:!0})),t("p",{class:"bp-sdk-online-quote__price-disclaimers bp-sdk-quote__price-disclaimer"},t("sup",null,"†"),"Initial payment of ",this._downpayment,", then ",this._monthlyPrice," for ",this.installments," months."),t("p",{class:"bp-sdk-online-quote__price-alt bp-sdk-quote__price-alt"},"Or ",this._annualPrice,"/yr")))}static get watchers(){return{annualPrice:["onAnnualPriceChange"],downpayment:["onDownpaymentChange"],monthlyPrice:["onMonthlyPriceChange"]}}};r.style="";const n=class{constructor(t){e(this,t),this.period=void 0,this.price=void 0,this.showObelus=!1,this.useExternal=!1}resetState(){}componentWillLoad(){this.useExternal=!!customElements.get("bp-sdk-external-quote-request-premium-payment"),customElements.whenDefined("bp-sdk-external-quote-request-premium-payment").then((()=>{this.useExternal=!0}))}render(){return[this.useExternal&&this.renderExternal(),!this.useExternal&&this.renderInternal()]}renderExternal(){return t("bp-sdk-external-quote-request-premium-payment",{period:this.period,price:this.price,showObelus:this.showObelus})}renderInternal(){return t("div",{class:"bp-sdk-quote-request-premium-payment__container"},t("div",{class:"bp-sdk-online-quote__price bp-sdk-quote__price"},t("div",{class:"bp-sdk-online-quote__pride-usd bp-sdk-quote__price-usd"},"$"),t("div",{class:"bp-sdk-online-quote__price-value bp-sdk-quote__price-value"},this.priceDisplay(this.price)),t("div",{class:"bp-sdk-online-quote__price-period bp-sdk-quote__price-period"},"/",this.period,this.showObelus&&t("sup",null,"†"))))}priceDisplay(e){if("number"==typeof e)return i(e);if(e&&e.includes(".")){const t=e.replace(/\B(?=(\d{3})+(?!\d))/g,",");return 2===t.split(".")[1].length?t:`${t}0`}return"0"}};n.style="";const o=class{constructor(t){e(this,t),this.price=void 0,this.showTotalPremium=void 0,this.termLength=void 0,this.totalPremium=void 0,this.useExternal=!1}resetState(){}componentWillLoad(){this.useExternal=!!customElements.get("bp-sdk-external-quote-request-premium-term"),customElements.whenDefined("bp-sdk-external-quote-request-premium-term").then((()=>{this.useExternal=!0}))}render(){return[this.useExternal&&this.renderExternal(),!this.useExternal&&this.renderInternal()]}renderExternal(){return t("bp-sdk-external-quote-request-premium-term",{price:this.price,showTotalPremium:this.showTotalPremium,termLength:this.termLength,totalPremium:this.totalPremium})}renderInternal(){return t("div",{class:"bp-sdk-quote-request-premium-term__container"},this.showTotalPremium&&t("div",{class:"bp-sdk-online-quote__price-total bp-sdk-quote__price-total"},t("span",{class:"bp-sdk-online-quote__price-total-prefix bp-sdk-quote__price-total-prefix"},"$"),t("span",{class:"bp-sdk-online-quote__price-total-number bp-sdk-quote__price-total-number"},this.totalPremium),t("span",{class:"bp-sdk-online-quote__price-total-year bp-sdk-quote__price-total-suffix"},"/year")),!this.showTotalPremium&&t("p",{class:"bp-sdk-online-quote__price-main bp-sdk-quote__price-main"},t("bp-sdk-quote-request-premium-payment",{price:this.price,period:this.termLength,showObelus:!1})))}};o.style="";export{r as bp_sdk_quote_request_premium_monthly,n as bp_sdk_quote_request_premium_payment,o as bp_sdk_quote_request_premium_term}