import { PrismaService } from '@hed-hog/api-prisma';
import { SettingService } from '../../setting/setting.service';
type DashboardCoreConfigStatus = {
    isConfigured: boolean;
};
type DashboardCoreLocaleConfigOverview = {
    status: DashboardCoreConfigStatus & {
        enabledLocaleCount: number;
        disabledLocaleCount: number;
    };
    settings: {
        dateFormat: string | null;
        timeFormat: string | null;
        timezone: string | null;
    };
    locales: Array<{
        id: number;
        code: string;
        region: string;
        name: string;
        enabled: boolean;
    }>;
};
type DashboardCoreMailProviderOverview = {
    id: string;
    label: string;
    selected: boolean;
    configured: boolean;
    missingKeys: string[];
};
type DashboardCoreMailConfigOverview = {
    status: DashboardCoreConfigStatus & {
        selectedProvider: string | null;
        configuredProvider: string | null;
    };
    sender: {
        from: string | null;
    };
    metrics: {
        templateCount: number;
        sentCount: number;
        sentLast30Days: number;
    };
    providers: DashboardCoreMailProviderOverview[];
};
type DashboardCoreOAuthProviderOverview = {
    id: string;
    label: string;
    enabled: boolean;
    configured: boolean;
    missingKeys: string[];
    scopesCount: number;
    connectedUsers: number;
};
type DashboardCoreOAuthConfigOverview = {
    status: DashboardCoreConfigStatus & {
        enabledProviderCount: number;
        configuredProviderCount: number;
        connectedAccountCount: number;
    };
    providers: DashboardCoreOAuthProviderOverview[];
};
type DashboardCoreStorageConfigOverview = {
    status: DashboardCoreConfigStatus & {
        totalProfiles: number;
        activeProfiles: number;
        defaultProfileId: number | null;
    };
    providers: Array<{
        providerType: string;
        total: number;
        active: number;
        defaults: number;
    }>;
    profiles: Array<{
        id: number;
        name: string;
        providerType: string;
        bucketName: string;
        region: string | null;
        endpointUrl: string | null;
        basePath: string | null;
        pathTemplate: string | null;
        forcePathStyle: boolean;
        isDefault: boolean;
        isActive: boolean;
        testStatus: string;
        lastTestedAt: Date | null;
        updatedAt: Date;
    }>;
};
type DashboardCoreThemePaletteMode = {
    primary: string | null;
    primaryForeground: string | null;
    secondary: string | null;
    secondaryForeground: string | null;
    accent: string | null;
    accentForeground: string | null;
    muted: string | null;
    mutedForeground: string | null;
    background: string | null;
    backgroundForeground: string | null;
    card: string | null;
    cardForeground: string | null;
};
type DashboardCoreThemeConfigOverview = {
    status: DashboardCoreConfigStatus & {
        configuredTokenCount: number;
    };
    branding: {
        systemName: string | null;
        systemSlogan: string | null;
        iconUrl: string | null;
        imageUrl: string | null;
    };
    presentation: {
        mode: string | null;
        font: string | null;
        textSize: string | null;
        radius: string | null;
    };
    palette: {
        light: DashboardCoreThemePaletteMode;
        dark: DashboardCoreThemePaletteMode;
    };
};
export type DashboardCoreConfigOverview = {
    localeConfig: DashboardCoreLocaleConfigOverview;
    mailConfig: DashboardCoreMailConfigOverview;
    oauthConfig: DashboardCoreOAuthConfigOverview;
    storageConfig: DashboardCoreStorageConfigOverview;
    themeConfig: DashboardCoreThemeConfigOverview;
};
export declare class DashboardCoreService {
    private readonly prismaService;
    private readonly settingService;
    private readonly logger;
    constructor(prismaService: PrismaService, settingService: SettingService);
    getConfigOverview(): Promise<DashboardCoreConfigOverview>;
    private getLocaleConfigOverview;
    private getMailConfigOverview;
    private getOAuthConfigOverview;
    private getStorageConfigOverview;
    private getThemeConfigOverview;
    private getMissingSettingKeys;
    private hasConfigValue;
    private toNullableString;
    private toNullableUppercaseString;
    private normalizeProviderList;
    private slugifyDashboardName;
    private getDashboardDisplayName;
    private buildUniqueDashboardSlug;
    private getDashboardUserOrThrow;
    private getUserRoleIds;
    private getDashboardComponentRoleRequirements;
    private userHasRequiredRolesForDashboard;
    private getDashboardRoleAccessState;
    private assertDashboardRoleAccess;
    private getAccessibleTemplateOrThrow;
    getHome(userId: number, locale: string): Promise<{
        id: number;
        icon: string | null;
        created_at: Date;
        updated_at: Date;
        slug: string;
        is_template: boolean;
    }>;
    fromSlug(slug: string, code: string): Promise<({
        dashboard_component: {
            dashboard_component_locale: {
                name: string;
                id: number;
                description: string;
                created_at: Date;
                updated_at: Date;
                locale_id: number;
                dashboard_component_id: number;
            }[];
        } & {
            id: number;
            height: number;
            width: number;
            created_at: Date;
            updated_at: Date;
            slug: string;
            library_slug: string;
            min_width: number;
            max_width: number | null;
            min_height: number;
            max_height: number | null;
            is_resizable: boolean;
        };
    } & {
        id: number;
        height: number;
        width: number;
        created_at: Date;
        updated_at: Date;
        component_id: number;
        dashboard_id: number;
        x_axis: number;
        y_axis: number;
    })[]>;
    calculateChange(current: number, previous: number): number;
    getUserStatistics(): Promise<{
        cards: {
            sessionsToday: {
                value: number;
                change: number;
            };
            activeUsers: {
                value: number;
                change: number;
            };
            roles: {
                value: number;
                change: number;
            };
        };
        charts: {
            permissionDistribution: {
                name: string;
                value: number;
                color: string;
            }[];
            sessionActivity: any[];
            userGrowth: {
                month: string;
                users: number;
                sessions: number;
            }[];
        };
    }>;
    getMailStatistics(): Promise<{
        cards: {
            emailsSent: {
                value: number;
                change: number;
            };
        };
        charts: {
            emailsPerWeek: {
                day: string;
                sent: number;
            }[];
        };
    }>;
    getSystemStatistics(): Promise<{
        cards: {
            menus: {
                value: number;
                change: number;
            };
            routes: {
                value: number;
                change: any;
            };
        };
    }>;
    getUserLayout(userId: number, slug: string, localeCode: string): Promise<{
        i: string;
        component_id: number;
        slug: any;
        library_slug: any;
        name: any;
        description: any;
        x: number;
        y: number;
        w: number;
        h: number;
        minW: any;
        maxW: any;
        minH: any;
        maxH: any;
        isResizable: any;
    }[]>;
    saveUserLayout(userId: number, slug: string, layout: Array<{
        i: string;
        x: number;
        y: number;
        w: number;
        h: number;
    }>): Promise<{
        success: boolean;
    }>;
    addWidgetToUserDashboard(userId: number, slug: string, componentSlug: string, localeCode: string): Promise<{
        i: string;
        component_id: number;
        slug: string;
        library_slug: string;
        name: any;
        description: any;
        x: number;
        y: number;
        w: number;
        h: number;
        minW: number;
        maxW: number;
        minH: number;
        maxH: number;
        isResizable: boolean;
    }>;
    removeWidgetFromUserDashboard(userId: number, slug: string, widgetId: string): Promise<{
        success: boolean;
        removedWidgetId: string;
    }>;
    checkDashboardAccess(userId: number, slug: string, locale: string): Promise<{
        hasAccess: boolean;
        dashboard: any;
        accessStatus?: undefined;
    } | {
        hasAccess: boolean;
        accessStatus: string;
        dashboard: {
            id: number;
            slug: string;
            name: string;
        };
    }>;
    getUserDashboards(userId: number, locale: string): Promise<{
        id: number;
        slug: string;
        name: string;
        icon: string;
        is_home: boolean;
        dashboard_locale: {
            name: string;
            id: number;
            created_at: Date;
            updated_at: Date;
            locale_id: number;
            dashboard_id: number;
        }[];
    }[]>;
    reorderUserDashboards(userId: number, slugs: string[] | undefined, locale: string): Promise<{
        success: boolean;
        orderedSlugs?: undefined;
    } | {
        success: boolean;
        orderedSlugs: string[];
    }>;
    getAvailableTemplates(userId: number, locale: string): Promise<{
        id: number;
        slug: string;
        name: string;
        icon: string;
        itemCount: number;
    }[]>;
    createUserDashboard(userId: number, data: {
        name?: string;
        slug?: string;
        icon?: string | null;
        templateSlug?: string;
    }, locale: string): Promise<{
        id: number;
        slug: string;
        name: string;
        icon: string;
        is_home: boolean;
    }>;
    renameUserDashboard(userId: number, slug: string, data: {
        name?: string;
        icon?: string | null;
    }, locale: string): Promise<{
        success: boolean;
        slug: string;
        name: string;
        icon: string;
    }>;
    setHomeDashboard(userId: number, slug: string, locale: string): Promise<{
        success: boolean;
        slug: string;
    }>;
    getDashboardShares(userId: number, slug: string, locale: string): Promise<{
        id: number;
        name: string;
        email: string;
        isCurrentUser: boolean;
        isHome: boolean;
        hasRequiredRoles: boolean;
        accessStatus: string;
    }[]>;
    getShareableUsers(userId: number, slug: string, options: {
        search?: string;
        page?: string | number;
        pageSize?: string | number;
    } | undefined, locale: string): Promise<{
        data: {
            id: number;
            name: string;
            email: string;
            hasRequiredRoles: boolean;
            accessStatus: string;
        }[];
        total: number;
        page: number;
        pageSize: number;
        lastPage: number;
        prev: number;
        next: number;
    }>;
    shareDashboard(userId: number, slug: string, sharedUserIds: number[] | undefined, sharedUserId: number | undefined, locale: string): Promise<{
        success: boolean;
        sharedCount: number;
        sharedUserIds: number[];
        alreadySharedUserIds: number[];
    }>;
    revokeDashboardShare(userId: number, slug: string, sharedUserId: number, locale: string): Promise<{
        success: boolean;
    }>;
    removeUserDashboard(userId: number, slug: string, locale: string): Promise<{
        success: boolean;
        removedSlug: string;
    }>;
    getAccountSecurity(userId: number): Promise<{
        score: number;
        checks: ({
            id: string;
            labelKey: string;
            descriptionKey: string;
            enabled: boolean;
            mfaTypes?: undefined;
        } | {
            id: string;
            labelKey: string;
            descriptionKey: string;
            enabled: boolean;
            mfaTypes: import("@prisma/client").$Enums.user_mfa_type_4ce08a626e_enum[];
        })[];
    }>;
    getActivityTimeline(userId: number): Promise<{
        id: number;
        action: string;
        created_at: Date;
    }[]>;
    getLoginHistory(userId: number): Promise<{
        day: string;
        logins: number;
        failed: number;
    }[]>;
    getProfile(userId: number): Promise<{
        id: number;
        name: string;
        photo_id: number;
        email: string;
        role: string;
        memberSince: Date;
        lastLogin: Date;
        totalSessions: number;
        totalRoles: number;
    }>;
    getQuickStats(userId: number): Promise<{
        onlineTime: string;
        actionsToday: number;
        consecutiveDays: number;
        securityLevel: number;
    }>;
    getUserRoles(userId: number, locale: string): Promise<{
        id: number;
        slug: string;
        name: string;
    }[]>;
    getEmailNotificationStats(userId: number): Promise<{
        cards: {
            received: number;
            read: number;
            unread: number;
            error: number;
        };
        chart: {
            date: string;
            received: number;
            read: number;
        }[];
    }>;
    getWidgetsData(userId: number, locale: string): Promise<{
        accountSecurity: {
            score: number;
            checks: ({
                id: string;
                labelKey: string;
                descriptionKey: string;
                enabled: boolean;
                mfaTypes?: undefined;
            } | {
                id: string;
                labelKey: string;
                descriptionKey: string;
                enabled: boolean;
                mfaTypes: import("@prisma/client").$Enums.user_mfa_type_4ce08a626e_enum[];
            })[];
        };
        activityTimeline: {
            id: number;
            action: string;
            created_at: Date;
        }[];
        emailNotifications: {
            cards: {
                received: number;
                read: number;
                unread: number;
                error: number;
            };
            chart: {
                date: string;
                received: number;
                read: number;
            }[];
        };
        loginHistory: {
            day: string;
            logins: number;
            failed: number;
        }[];
        profile: {
            id: number;
            name: string;
            photo_id: number;
            email: string;
            role: string;
            memberSince: Date;
            lastLogin: Date;
            totalSessions: number;
            totalRoles: number;
        };
        quickStats: {
            onlineTime: string;
            actionsToday: number;
            consecutiveDays: number;
            securityLevel: number;
        };
        userRoles: {
            id: number;
            slug: string;
            name: string;
        }[];
        userSessions: {
            id: string;
            ip_address: string;
            user_agent: string;
            created_at: Date;
            expires_at: Date;
        }[];
    }>;
    getUserSessions(userId: number): Promise<{
        id: string;
        ip_address: string;
        user_agent: string;
        created_at: Date;
        expires_at: Date;
    }[]>;
}
export {};
//# sourceMappingURL=dashboard-core.service.d.ts.map