/**
* SettingsProvider - Provides site-wide settings to all components
*
* Fetches Settings global from Payload CMS and makes it available via Context.
* Used for CAPTCHA configuration, analytics, SEO defaults, etc.
*
* Usage:
*
*
*
*
* const settings = useSettings();
* const captchaProvider = settings?.captcha?.provider;
*
* Copyright (c) 2025 QwickApps.com. All rights reserved.
*/
import React from 'react';
export interface Settings {
siteName?: string;
siteDescription?: string;
siteUrl?: string;
logoIcon?: string;
customLogoIcon?: string;
logoText?: string;
logoBadge?: string;
logoBadgeShape?: 'circle' | 'square' | 'rounded';
siteLogo?: any;
favicon?: any;
copyrightText?: string;
adminEmail?: string;
supportEmail?: string;
contactPhone?: string;
businessAddress?: {
street?: string;
city?: string;
state?: string;
postalCode?: string;
country?: string;
};
socialMedia?: {
facebook?: string;
twitter?: string;
instagram?: string;
linkedin?: string;
youtube?: string;
github?: string;
};
googleAnalytics?: {
enabled?: boolean;
measurementId?: string;
};
googleTagManager?: {
enabled?: boolean;
containerId?: string;
};
facebookPixel?: {
enabled?: boolean;
pixelId?: string;
};
captcha?: {
provider?: 'none' | 'recaptcha-v2' | 'recaptcha-v3' | 'hcaptcha' | 'turnstile';
siteKey?: string;
secretKey?: string;
threshold?: number;
};
seo?: {
defaultTitle?: string;
defaultDescription?: string;
defaultKeywords?: string;
defaultOgImage?: any;
};
email?: {
provider?: string;
smtpHost?: string;
smtpPort?: number;
smtpUser?: string;
smtpPassword?: string;
fromEmail?: string;
fromName?: string;
};
customScripts?: {
headerScripts?: string;
footerScripts?: string;
customCss?: string;
};
maintenance?: {
enabled?: boolean;
message?: string;
allowedIPs?: string;
};
defaultTheme?: 'light' | 'dark';
defaultPalette?: string;
showThemeSwitcher?: boolean;
showPaletteSwitcher?: boolean;
}
interface SettingsContextType {
settings: Settings | null;
loading: boolean;
error: Error | null;
refresh: () => Promise;
}
interface SettingsProviderProps {
children: React.ReactNode;
initialSettings?: Settings;
}
export declare function SettingsProvider({ children, initialSettings }: SettingsProviderProps): import("react/jsx-runtime").JSX.Element;
/**
* Hook to access site settings
*
* @returns Settings context with settings, loading state, error, and refresh function
* @throws Error if used outside SettingsProvider
*/
export declare function useSettings(): SettingsContextType;
export {};
//# sourceMappingURL=SettingsProvider.d.ts.map