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,c,r,s;return h("sc-card",{key:"826c059459a12c5b39811ff01079ad3024a53500"},h("sc-flex",{key:"ff0a03bf78a9fb6a446cb50952d989225953b58f",alignItems:"center",justifyContent:"flex-start",style:{gap:"0.5em"}},h("sc-payment-method",{key:"7e72e44534372a80eebcb3c95549de197c72d9a8",paymentMethod:this.paymentMethod}),h("div",{key:"67371eea77408f2d09387095407f07a2b3bb955a"},!!(null===(t=null===(e=this.paymentMethod)||void 0===e?void 0:e.card)||void 0===t?void 0:t.exp_month)&&h("span",{key:"6f8b0735d4e37fdd4c88f0125077e5eb78749e32"},
// 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===(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:"42897688c5d69d5939647b5113bf17387bc95efb",type:"text",circle:!0,onClick:this.editHandler},h("sc-icon",{key:"799ce0fc86eda6652cbf9cda7761f80b0544c0e5",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:""}}}}}