import{h}from"@stencil/core";import{__,sprintf}from"@wordpress/i18n";export class ScPaymentMethodDetails{constructor(){this.paymentMethod=void 0,this.editHandler=void 0}render(){var e,t,d,o,i,a,n,c,r,s;return h("sc-card",{key:"5d651c5f39fcf7583819c5008810687b261e9a64"},h("sc-flex",{key:"571408bd4eac6c7d792f1b113bf832d17490668c",alignItems:"center",justifyContent:"flex-start",style:{gap:"0.5em"}},h("sc-payment-method",{key:"ef3a232e7e5dcf40a404313398d4c44d520175e1",paymentMethod:this.paymentMethod}),h("div",{key:"eb0c177db20b0988164a5dacf50577660aafe3e8"},!!(null===(t=null===(e=this.paymentMethod)||void 0===e?void 0:e.card)||void 0===t?void 0:t.exp_month)&&h("span",{key:"cdd01ce0114e75bc8ef29a040b7f9ad390743e63"},
// Translators: %d/%d is month and year of expiration.
sprintf(__("Exp. %d/%d","surecart"),null===(o=null===(d=this.paymentMethod)||void 0===d?void 0:d.card)||void 0===o?void 0:o.exp_month,null===(a=null===(i=this.paymentMethod)||void 0===i?void 0:i.card)||void 0===a?void 0:a.exp_year)),!!(null===(c=null===(n=this.paymentMethod)||void 0===n?void 0:n.paypal_account)||void 0===c?void 0:c.email)&&(null===(s=null===(r=this.paymentMethod)||void 0===r?void 0:r.paypal_account)||void 0===s?void 0:s.email)),h("sc-button",{key:"114b809f9b8dc27bb95fe69310775b721d13857e",type:"text",circle:!0,onClick:this.editHandler},h("sc-icon",{key:"65519fc51b08cd60eb9264ef07f2ce1b45b2a69d",name:"edit-2"}))))}static get is(){return"sc-payment-method-details"}static get encapsulation(){return"shadow"}static get properties(){return{paymentMethod:{type:"unknown",mutable:!1,complexType:{original:"PaymentMethod",resolved:"PaymentMethod",references:{PaymentMethod:{location:"import",path:"../../../types",id:"src/types.ts::PaymentMethod"}}},required:!1,optional:!1,docs:{tags:[],text:""}},editHandler:{type:"unknown",mutable:!1,complexType:{original:"() => void",resolved:"() => void",references:{}},required:!1,optional:!1,docs:{tags:[],text:""}}}}}