import type { AuthenticatorType } from '../authenticators'; import type { AuthResponse, BaseAuthCredentials, CustomAuthConfig } from '../types'; import type { BaseAuthPageProps } from './AuthFormUtils'; /** * Base login credentials interface that can be extended for specific implementations */ interface PagamioLoginCredentials { username: string; password: string; rememberMe?: boolean; } /** * Props for the PagamioLoginPage component * @template T - Authentication configuration type */ interface PagamioLoginPageProps extends BaseAuthPageProps { /** Customizable text content */ text?: { welcomeTitle: string; welcomeSubtitle: string; usernameLabel: string; passwordLabel: string; rememberMeLabel: string; loginButtonLabel: string; loadingButtonLabel: string; forgotPasswordLabel: string; createAccountLabel: string; }; /** Callback handlers */ onForgotPassword?: () => void; onLoginSuccess?: (authResponse?: AuthResponse) => void; onLoginError?: (error: Error) => void; /** Account creation options */ hasCreateAccount?: boolean; createAccountRoute?: string; onCreateAccount?: () => void; /** * Custom data transformation handler for login data * Should return object to be used as login credentials * @template TFormData - Type of the form data */ transformLoginData?: (credentials: BaseAuthCredentials) => Record; /** Styling options */ className?: string; cardClassName?: string; /** * Authenticator type to use for login * Supports 'default', 'strapi', or any custom registered type */ authenticatorType?: AuthenticatorType | string; } export interface LoginErrorProps { code: string; message: string; } export declare const loginPageDefaultText: { welcomeTitle: string; welcomeSubtitle: string; usernameLabel: string; passwordLabel: string; rememberMeLabel: string; loginButtonLabel: string; loadingButtonLabel: string; forgotPasswordLabel: string; createAccountLabel: string; }; /** * Generic Login Page component * @template T - Authentication configuration type */ export declare function PagamioLoginPage({ logo, text, appLabel, onForgotPassword, onLoginSuccess, onLoginError, hasCreateAccount, createAccountRoute, onCreateAccount, transformLoginData, authenticatorType, className, }: Readonly>): import("react/jsx-runtime").JSX.Element; export default PagamioLoginPage; export type { PagamioLoginCredentials, PagamioLoginPageProps };