import{g as $,i as x,aH as S,u as j,U as C,a as F,cG as b,j as o,_ as v,f as P,bG as _}from"./main-634.js";import{F as p}from"./bf-767-388.js";import{S as L}from"./bf-982-242.js";import"./bf-25-81.js";import"./bf-497-246.js";import"./bf-641-107.js";import"./bf-400-72.js";import"./bf-438-114.js";function R(){var i,l,r;const{fieldKey:s}=$(),[c,d]=x(S),y=j(C),{css:a}=F();if(!s)return null;const e=c[s],n=b((e==null?void 0:e.typ)||""),g=(i=e==null?void 0:e.payIntegID)!=null?i:"",f=(r=(l=e==null?void 0:e.lbl)!=null?l:e==null?void 0:e.adminLbl)!=null?r:"",I=()=>y.filter(t=>t.type.toLowerCase()===n.toLowerCase()).map(t=>o.jsx("option",{value:t.id,children:t.name},t.id)),h=u=>{const{value:t}=u.target,m=P(c,A=>{A[s].payIntegID=t});d(m),_({event:`${n} Account Changed to "${t}": ${f||s}`,type:"payment_account_change",state:{fields:m,fldKey:s}})};return o.jsx(L,{id:"slct-cnfg-stng",title:`${n} Accounts`,className:`${a(p.fieldSection)}`,open:!0,children:o.jsxs("select",{"data-testid":"slct-cnfg-slct",name:"payIntegID",id:"payIntegID",onChange:h,className:a(p.input),value:g,"aria-label":`Select ${n} Account`,children:[o.jsx("option",{value:"",children:v("Select Account")}),I()]})})}export{R as default};
