import{r as e,c as t,h as r,g as n}from"./p-890a2f7e.js";import{E as a}from"./p-c9a42c5a.js";import"./p-d0c8864c.js";import"./p-be8a42cb.js";import{N as i}from"./p-363dca49.js";import{H as o}from"./p-7e91950a.js";import{d as s}from"./p-9f421a09.js";import"./p-87741a18.js";import"./p-d6eb762b.js";import"./p-112455b1.js";import"./p-1ae2b158.js";const m={"Retrying payment.":"Försöker betalning igen.","Your payment was declined.":"Din betalning misslyckades.","Payment succeeded.":"Betalningen lyckades.","Please confirm that there are sufficient funds in your account or update your payment method.":"Bekräfta att det finns tillräckligt med pengar på ditt konto eller uppdatera din betalningsmetod.","To update your payment method, add a new card or change your default card by reordering your payment methods.":"För att uppdatera din betalningsmetod, lägg till ett nytt kort eller ändra ditt standardkort genom att ändra ordning på dina betalningsmetoder.","Make sure that your preferred card is at the top.":"Se till att kortet du vill använda är högst upp.","Retry Payment":"Försök igen"},d=class{constructor(r){e(this,r),this.notice=t(this,"notice",7)}componentWillLoad(){this.t=s.create({sv:m},this.element)}async retry(){this.notice.emit(i.execute(this.t("Retrying payment."),(async()=>{let e;const t=await o.client.customer.retryPayment();return e=a.is(t)||"string"==typeof t||t.errors>0||t.unpaid>0?[!1,this.t("Your payment was declined.")]:[!0,this.t("Payment succeeded.")],e})))}render(){return[r("smoothly-icon",{name:"warning",size:"large"}),r("h3",null,this.t("Your payment was declined.")),r("p",null,r("b",null,this.t("Please confirm that there are sufficient funds in your account or update your payment method.")),r("br",null),this.t("To update your payment method, add a new card or change your default card by reordering your payment methods."),r("br",null)," ",this.t("Make sure that your preferred card is at the top.")),r("smoothly-submit",{prevent:!0,color:"dark",onSubmit:()=>{this.retry()}},this.t("Retry Payment"))]}get element(){return n(this)}};d.style=".sc-customer-warning-h{display:-ms-flexbox;display:flex;-ms-flex-line-pack:center;align-content:center;max-width:90em;min-height:7em;border-radius:1em;margin-bottom:1em;margin-top:1em;padding:0.5em;padding-right:2em}smoothly-icon.sc-customer-warning{margin-top:0.5em;margin-left:2em}h3.sc-customer-warning{margin-left:0.5em;-ms-flex-negative:0;flex-shrink:0}p.sc-customer-warning{width:80%;margin-top:3.4em;margin-left:-16.2em;-ms-flex-positive:2;flex-grow:2}smoothly-submit.sc-customer-warning{height:-webkit-max-content;height:-moz-max-content;height:max-content;padding:0.3em;border-radius:0.5em;text-transform:uppercase;width:8.5em;text-align:center;margin-top:3em;-ms-flex-item-align:baseline;align-self:baseline;cursor:pointer;font-size:1em}";export{d as customer_warning}