"use strict";var E=Object.create;var i=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var P=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty;var l=(n,e)=>{for(var t in e)i(n,t,{get:e[t],enumerable:!0})},p=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of f(e))!u.call(n,s)&&s!==t&&i(n,s,{get:()=>e[s],enumerable:!(r=_(e,s))||r.enumerable});return n};var T=(n,e,t)=>(t=n!=null?E(P(n)):{},p(e||!n||!n.__esModule?i(t,"default",{value:n,enumerable:!0}):t,n)),m=n=>p(i({},"__esModule",{value:!0}),n);var C={};l(C,{default:()=>I});module.exports=m(C);var c=T(require("react"));var o={},v=()=>{let n=typeof o.env<"u"&&o.env.VITE_APP_RESPONSE_TYPE||typeof process<"u"&&process?.env?.REACT_APP_RESPONSE_TYPE,e=typeof o.env<"u"&&o.env.VITE_APP_CLIENT_ID||typeof process<"u"&&process?.env?.REACT_APP_CLIENT_ID,t=typeof o.env<"u"&&o.env.VITE_APP_REDIRECT_URI||typeof process<"u"&&process?.env?.REACT_APP_REDIRECT_URI,r=typeof o.env<"u"&&o.env.VITE_APP_SCOPE||typeof process<"u"&&process?.env?.REACT_APP_SCOPE,s=typeof o.env<"u"&&o.env.VITE_APP_STATE||typeof process<"u"&&process?.env?.REACT_APP_STATE;if(!n||!e||!t||!r||!s){let d=`Missing environment variables (VITE_APP_  or  REACT_APP_): ${[!n&&"RESPONSE_TYPE",!e&&"CLIENT_ID",!t&&"REDIRECT_URI",!r&&"SCOPE",!s&&"STATE"].filter(Boolean).join(", ")}`;console.warn(d)}return{responseType:n,clientId:e,redirectUri:t,scope:r,state:s}},a=v;function A(){return c.default.createElement("button",{onClick:()=>{let e=a();if(!e)return;let t=`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=t},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 I=A;
//# sourceMappingURL=Oauth2Button.js.map