| 1 |
import{g as j,i as C,u as F,J as $,a as v,cO as _,j as n,_ as a,ch as g,f as L,bI as B,b1 as N}from"./main-96.js";import{F as f}from"./bf-460-326.js";import{S as w}from"./bf-283-176.js";import"./bf-781-46.js";import"./bf-687-180.js";import"./bf-551-68.js";import"./bf-200-43.js";import"./bf-431-60.js";/* empty css */import"./bf-63-62.js";import"./bf-762-63.js";import"./bf-163-182.js";const z={paypal:"PayPal",stripe:"Stripe",razorpay:"Razorpay",mollie:"Mollie"};function Q(){var l,p,m,u;const{fieldKey:s}=j(),[c,I]=C(N),h=F($),{css:r}=v();if(!s)return null;const t=c[s],o=_((t==null?void 0:t.typ)||""),i=(l=z[t==null?void 0:t.typ])!=null?l:o,A=(p=t==null?void 0:t.payIntegID)!=null?p:"",S=(u=(m=t==null?void 0:t.lbl)!=null?m:t==null?void 0:t.adminLbl)!=null?u:"",x=()=>h.filter(e=>e.type.toLowerCase()===o.toLowerCase()).map(e=>n.jsx("option",{value:e.id,children:e.name},e.id)),P=y=>{const{value:e}=y.target,d=L(c,b=>{b[s].payIntegID=e});I(d),B({event:`${o} Account Changed to "${e}": ${S||s}`,type:"payment_account_change",state:{fields:d,fldKey:s}})};return n.jsx(w,{id:"slct-cnfg-stng",title:g(a("%s Accounts"),i),className:`${r(f.fieldSection)}`,open:!0,children:n.jsxs("select",{"data-testid":"slct-cnfg-slct",name:"payIntegID",id:"payIntegID",onChange:P,className:r(f.input),value:A,"aria-label":g(a("Select %s Account"),i),children:[n.jsx("option",{value:"",children:a("Select Account")}),x()]})})}export{Q as default}; |