var a=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var u=(t,s)=>{for(var r in s)a(t,r,{get:s[r],enumerable:!0})},S=(t,s,r,e)=>{if(s&&typeof s=="object"||typeof s=="function")for(let o of f(s))!p.call(t,o)&&o!==r&&a(t,o,{get:()=>s[o],enumerable:!(e=d(s,o))||e.enumerable});return t};var k=t=>S(a({},"__esModule",{value:!0}),t);var A={};u(A,{default:()=>m});module.exports=k(A);var n=require("react"),c=require("@stacks/connect"),l=()=>{let[t,s]=(0,n.useState)(""),r=new c.AppConfig(["store_write","publish_data"]),e=new c.UserSession({appConfig:r}),o=()=>{e.signUserOut(),s("")};return(0,n.useEffect)(()=>{if(e)try{let i=e.loadUserData();s(i.profile.stxAddress.testnet)}catch(i){}},[e]),{stacksAddress:t,userSession:e,disconnectStacks:o}},m=l;
