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