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,a,d,o,i,n,c,r,s;return h("sc-card",{key:"c1a547159f611ebb0036be1cae0e516d69af3dfa"},h("sc-flex",{key:"6af0f5ad82a2a49534627b3f22e471b9a15b2e09",alignItems:"center",justifyContent:"flex-start",style:{gap:"0.5em"}},h("sc-payment-method",{key:"967b33a85f1280debb62be93b4c40c377b6bc561",paymentMethod:this.paymentMethod}),h("div",{key:"769e4c0b5352ea3a925cb808fd066aea97aa433d"},!!(null===(t=null===(e=this.paymentMethod)||void 0===e?void 0:e.card)||void 0===t?void 0:t.exp_month)&&h("span",{key:"80305bc8a62bdf5e55a1880caa8585e3f77d9986"},
// Translators: %d/%d is month and year of expiration.
sprintf(__("Exp. %d/%d","surecart"),null===(d=null===(a=this.paymentMethod)||void 0===a?void 0:a.card)||void 0===d?void 0:d.exp_month,null===(i=null===(o=this.paymentMethod)||void 0===o?void 0:o.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:"a885d5f8e08cfbf6c7d9a015c2c970436dff9f27",type:"text",circle:!0,onClick:this.editHandler},h("sc-icon",{key:"2512d4c3b4b8310b424d151f2bf74d16a414725d",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:""}}}}}