import a from"react";var p=()=>{let t=typeof import.meta.env<"u"&&import.meta.env.VITE_APP_RESPONSE_TYPE||typeof process<"u"&&process?.env?.REACT_APP_RESPONSE_TYPE,e=typeof import.meta.env<"u"&&import.meta.env.VITE_APP_CLIENT_ID||typeof process<"u"&&process?.env?.REACT_APP_CLIENT_ID,n=typeof import.meta.env<"u"&&import.meta.env.VITE_APP_REDIRECT_URI||typeof process<"u"&&process?.env?.REACT_APP_REDIRECT_URI,o=typeof import.meta.env<"u"&&import.meta.env.VITE_APP_SCOPE||typeof process<"u"&&process?.env?.REACT_APP_SCOPE,s=typeof import.meta.env<"u"&&import.meta.env.VITE_APP_STATE||typeof process<"u"&&process?.env?.REACT_APP_STATE;if(!t||!e||!n||!o||!s){let i=`Missing environment variables (VITE_APP_  or  REACT_APP_): ${[!t&&"RESPONSE_TYPE",!e&&"CLIENT_ID",!n&&"REDIRECT_URI",!o&&"SCOPE",!s&&"STATE"].filter(Boolean).join(", ")}`;console.warn(i)}return{responseType:t,clientId:e,redirectUri:n,scope:o,state:s}},r=p;function c(){return a.createElement("button",{onClick:()=>{let e=r();if(!e)return;let n=`https://dash.usemoon.ai/authorize?response_type=${e.responseType}&client_id=${e.clientId}&redirect_uri=${e.redirectUri}&scope=${e.scope}&state=${e.state}`;window.location.href=n},className:"w-full px-3 py-2 text-white bg-blue-500 rounded-lg hover:bg-blue-700 focus:outline-none focus:shadow-outline"},"Login with Moon")}var P=c;export{P as default};
//# sourceMappingURL=Oauth2Button.mjs.map