Loading
function(e,t,l){l.d(t,{a:()=>v,v:()=>j}),l(321073);var s=l(627968),i=l(64700),n=l(355522),r=l(885574),a=l(691885),c=l(834730),d=l(939249),u=l(661531),o=l(990078),m=l(46054),x=l(812745),h=l(327105),C=l(375708),p=l(643892);let v="new_payment_source_id";function j(e){let{value:t,options:l,onChange:j,onNew:g,noticeMessage:f,newPaymentMethodOptionLabel:L,disabled:E=!1,error:b}=e,N=i.useMemo(()=>{let e=l.map(e=>{let t=null!=e.icon?e.icon===x.Be.BANK?(0,s.jsx)(n.M,{className:p.s7}):(0,s.jsx)("img",{src:(0,x.Nj)(e.icon),alt:"",className:p.s7}):void 0,l=null!=e.tooltipText?(0,s.jsx)(o.m,{text:e.tooltipText,asContainer:!0,children:(0,s.jsx)(r.m,{size:"xs",color:u.A.colors.TEXT_MUTED})}):void 0;return{id:e.id,value:e.id,label:e.label,leading:t,trailing:l,description:e.description,disabled:e.disabled}});return e.push({id:v,value:v,label:L??C.intl.string(h.default.rNF29q),leading:void 0,description:void 0}),e},[l,L]),T=i.useCallback(e=>{e===v?g():null!=e&&j(e)},[g,j]),A=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.l,{label:C.intl.string(C.t["u+Cw58"]),hideLabel:!0,placeholder:C.intl.string(h.default.rNF29q),value:t,options:N,onSelectionChange:T,selectionMode:"single",disabled:E||0===l.length,errorMessage:b,fullWidth:!0,variant:"unsupported_payment_modal_card"}),null!=f?(0,s.jsxs)("div",{className:p.T4,children:[(0,s.jsx)(r.m,{size:"xs",color:u.A.colors.TEXT_FEEDBACK_INFO}),(0,s.jsx)(c.E,{variant:"text-xs/normal",color:"text-feedback-info",children:"string"==typeof f?m.A.parse(f,!1,{allowLinks:!0}):f})]}):null]});return 0!==l.length||E?A:(0,s.jsx)(d.D,{onClick:g,"aria-label":C.intl.string(h.default.rNF29q),className:p.OV,children:A})}}