import{n as e,r as t}from"./chunk-QTnfLwEv.js";import{n}from"./index-7yDgay5u.js";import{i as r,o as i,t as a}from"./jsx-runtime-DHSfUA5-.js";import{P as o,R as s,T as c}from"./test.id-DxQrYxPk.js";import{t as l}from"./check-DqMliDjm.js";import{t as u}from"./copy-D1nqEVm3.js";import{t as d}from"./useSuccessToast-CW8oLO3e.js";import{t as f}from"./useTopTips-B9oW_JMO.js";var p=e({MembershipAccount:()=>g}),m=t(i(),1),h=a();function g({memberId:e}){let t=o(s),i=d(),a=f(),[p,g]=(0,m.useState)(!1),_=async()=>{if(e)try{await t.writeToClipboard(e),g(!0),i({message:n(`common.copied`,`Copied`),onDone:()=>g(!1)})}catch(e){g(!1),a({message:e instanceof Error?e.message:String(e)})}},v=p?n(`common.copied`,`Copied`):n(`common.copy`,`Copy`);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`p`,{className:r.Membership.AccountLabel,children:n(`settings.membership.memberId`,`Account ID`)}),(0,h.jsxs)(`section`,{className:r.Membership.Card,children:[(0,h.jsx)(`span`,{className:r.Membership.AccountId,"data-test-id":c.memberId,children:e??n(`settings.membership.notConfigured`,`Not configured`)}),(0,h.jsx)(`button`,{className:r.Membership.CopyButton,type:`button`,disabled:!e,"aria-label":v,title:v,onClick:()=>void _(),children:p?(0,h.jsx)(l,{size:15,"aria-hidden":`true`}):(0,h.jsx)(u,{size:15,"aria-hidden":`true`})})]})]})}export{p as n,g as t};
//# sourceMappingURL=account-DO4Si9F8.js.map