type IProvider = "facebook" | "google" | "gitlab" | "github" | "authentik";

export type Component = {
	id?: string;
	style?: string;
	social_auth_server_url?: string;
	auth_cookie_name?: string;
	redirectonlogin?: string;
	provider: {
		url?: string;
		name: IProvider;
		params?: {
			redirect_url: string;
			client_id: string;
			scope: string;
			auth_server_url?: string;
		};
	} | undefined;
};

export type Events = {
	oauthFlowSuccess: { token: string };
	oauthFlowInit: { token?: string; provider: IProvider; tmpCode?: string; redirect_uri?: string };
	/** Emitted right before navigating to the provider (user chose social login). */
	oauthFlowRedirectStart: { provider: IProvider };
	oauthFlowCustom: { provider: IProvider };
};
