import"react";import{Connect as m}from"@stacks/connect-react";import{useEffect as i,useState as a}from"react";import{AppConfig as p,UserSession as f}from"@stacks/connect";var d=()=>{let[o,s]=a(""),e=new p(["store_write","publish_data"]),t=new f({appConfig:e}),c=()=>{t.signUserOut(),s("")};return i(()=>{if(t)try{let r=t.loadUserData();s(r.profile.stxAddress.testnet)}catch{}},[t]),{stacksAddress:o,userSession:t,disconnectStacks:c}},n=d;import{jsx as S}from"react/jsx-runtime";var u=({children:o,clientConfig:s})=>{let{profile:e}=s,{userSession:t}=n();return S(m,{authOptions:{appDetails:{name:e?.name,icon:e?.profileImage},redirectTo:"/",onFinish:()=>{},userSession:t},children:o})},x=u;export{x as default};
