const clientId = process.env.REACT_APP_MSAL_CLIENT_ID;
const tenantId = process.env.REACT_APP_MSAL_TENANT_ID;
const redirectUri = process.env.REACT_APP_MSAL_REDIRECT_URI;

if (!clientId || !tenantId || !redirectUri) {
  console.warn("Missing MSAL environment variables. Check your .env or Webpack DefinePlugin.");
}

export const msalConfig = {
    auth: {
      clientId: clientId || "",
      authority: `https://login.microsoftonline.com/${tenantId || "common"}`,
      redirectUri: redirectUri || "http://localhost:3000",
    },
    cache: {
      cacheLocation: "localStorage", // Configure this as needed
      storeAuthStateInCookie: false, // Configure this as needed
    }
  };

  export const loginRequest = {
    scopes: ["User.Read"] // Add the scopes you need
  };

  export const graphConfig = {
    graphMeEndpoint: "https://graph.microsoft.com/v1.0/me"
  };
  
