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,a,i,n,r,c,s;return h("sc-card",{key:"5dc361c39a660ab59c6f5a57ff7280b7d3e313d6"},h("sc-flex",{key:"6d18af97690354eb468ef4d209023c9eb00e629d",alignItems:"center",justifyContent:"flex-start",style:{gap:"0.5em"}},h("sc-payment-method",{key:"3be96857587dadcf87cbf76ca05c50109c6f0377",paymentMethod:this.paymentMethod}),h("div",{key:"2575064f372d62298a6dea715eb139d586889474"},!!(null===(t=null===(e=this.paymentMethod)||void 0===e?void 0:e.card)||void 0===t?void 0:t.exp_month)&&h("span",{key:"4d36dfe7f7ee73a54f11e02c186f1d82803709c8"},
// 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===(i=null===(a=this.paymentMethod)||void 0===a?void 0:a.card)||void 0===i?void 0:i.exp_year)),!!(null===(r=null===(n=this.paymentMethod)||void 0===n?void 0:n.paypal_account)||void 0===r?void 0:r.email)&&(null===(s=null===(c=this.paymentMethod)||void 0===c?void 0:c.paypal_account)||void 0===s?void 0:s.email)),h("sc-button",{key:"9149047b8abd55a9e54758d967793591dda1dca5",type:"text",circle:!0,onClick:this.editHandler},h("sc-icon",{key:"18983d7beafbb993bd4bac441d195f13980dedf4",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:""}}}}}