| 1 |
import{a as _,j as t,_ as n}from"./main-96.js";import{S as x}from"./bf-39-66.js";import{u as j,b as a}from"./bf-331-47.js";import{a as N}from"./bf-16-67.js";const u="__bf_connect_new__";function b({type:o,value:i,onSelect:r,label:p=n("Account")}){const{css:c}=_(),{apps:m}=j(),h=N(o,r),s=m.filter(e=>e.integration_type===o),g=e=>{const l=e.target.value;if(l===u){h();return}const d=s.find(f=>String(f.id)===String(l));d&&r(d)};return t.jsxs(x,{title:p,className:c(a.acctWrp),children:[t.jsx("div",{className:c(a.acctRow),"data-testid":"integ-account-selector",children:t.jsxs("select",{className:`btcd-paper-inp ${c(a.acctSelect)}`,value:i?String(i):"",onChange:g,name:"parentAppId","data-testid":"integ-account-select",children:[t.jsx("option",{value:"",disabled:!0,children:s.length?n("Select an account..."):n("No account connected yet")}),s.map(e=>t.jsx("option",{value:String(e.id),children:e.integration_name},e.id)),t.jsx("option",{value:u,children:`+ ${n("Connect a new account")}`})]})}),s.length===0?t.jsx("div",{className:c(a.acctEmpty),children:n('Authorize this service once and reuse the account in any form — pick "Connect a new account" above.')}):t.jsx("div",{className:c(a.acctHint),children:n("Accounts are reusable across forms.")})]})}export{b as A}; |