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