import { Component } from 'react';
import { default as default_2 } from 'react';
import { ErrorInfo } from 'react';
import { JSX as JSX_2 } from 'react/jsx-runtime';
import { NotificationFilters } from '@edusight/notification-sdk';
import { ReactNode } from 'react';
import { Notification as SDKNotification } from '@edusight/notification-sdk';

export declare const BellComponent: default_2.FC<BellComponentProps>;

export declare interface BellComponentProps {
    unreadCount: number;
    onClick: () => void;
    size: 'small' | 'medium' | 'large';
    className?: string;
    disabled?: boolean;
}

export declare interface DeliverySchedule {
    enabled?: boolean;
    timezone: string;
    quietHours: {
        start: string;
        end: string;
    };
    weekdays: boolean[];
    weeklySchedule?: Record<string, {
        start: string;
        end: string;
    }>;
}

declare interface ErrorBoundaryProps {
    children: ReactNode;
    onError?: (error: Error, errorInfo: ErrorInfo) => void;
}

export declare interface ErrorBoundaryState {
    hasError: boolean;
    error: Error | null;
    errorInfo: any | null;
}

export declare const InboxPopover: default_2.FC<InboxPopoverProps>;

export declare interface InboxPopoverProps {
    isOpen: boolean;
    onClose: () => void;
    position: 'left' | 'right';
    currentView: 'notifications' | 'preferences';
    onViewChange: (view: 'notifications' | 'preferences') => void;
    notifications: Notification_2[];
    onNotificationAction: (id: string, action: NotificationAction) => void;
    preferences?: NotificationPreferences;
    onPreferenceChange?: (key: string, value: any) => void;
    isPreferencesLoading?: boolean;
    size?: 'small' | 'medium' | 'large';
    onMorePreferencesClick?: () => void;
    specificPreferences?: WorkflowSubscription[];
    onLoadMoreSpecific?: () => void;
    hasMoreSpecific?: boolean;
    isListLoading?: boolean;
}

export declare interface MockSDK {
    notifications: {
        getAll: jest.Mock;
        markAsRead: jest.Mock;
        markAsUnread: jest.Mock;
        delete: jest.Mock;
        archive: jest.Mock;
    };
    websocket: {
        connect: jest.Mock;
        disconnect: jest.Mock;
        on: jest.Mock;
        emit: jest.Mock;
    };
    preferences: {
        get: jest.Mock;
        update: jest.Mock;
    };
    errors: {
        retry: jest.Mock;
        getLastError: jest.Mock;
    };
}

declare interface Notification_2 {
    id: string;
    subject: string;
    body: string;
    avatar?: string;
    isRead: boolean;
    isArchived: boolean;
    timestamp: Date;
    tags: string[];
    actions: NotificationAction[];
    metadata: Record<string, any>;
}
export { Notification_2 as Notification }

export declare interface NotificationAction {
    type: 'mark_read' | 'mark_unread' | 'archive' | 'delete' | 'custom';
    label: string;
    icon?: string;
    handler: (notificationId: string) => Promise<void>;
}

export declare interface NotificationChannels {
    email: boolean;
    push: boolean;
    sms: boolean;
    inApp: boolean;
}

export { NotificationFilters }

export declare const NotificationItem: default_2.FC<NotificationItemProps_2>;

export declare interface NotificationItemProps {
    notification: Notification_2;
    onAction: (action: NotificationAction) => void;
    isSelected?: boolean;
    onSelectionChange?: (selected: boolean) => void;
}

declare interface NotificationItemProps_2 {
    notification: Notification_2;
    onActionClick?: (notificationId: string, action: NotificationAction) => void;
    onSelectionChange?: (selected: boolean) => void;
    isSelected?: boolean;
}

export declare interface NotificationPreferences {
    channels: NotificationChannels;
    subscriptions: WorkflowSubscription[];
    deliverySchedule: DeliverySchedule;
}

export declare const NotificationWidget: default_2.FC<NotificationWidgetProps>;

export declare class NotificationWidgetErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
    constructor(props: ErrorBoundaryProps);
    static getDerivedStateFromError(error: Error): Partial<ErrorBoundaryState>;
    componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
    handleRetry: () => void;
    render(): string | number | boolean | JSX_2.Element | Iterable<default_2.ReactNode> | null | undefined;
}

export declare interface NotificationWidgetProps {
    sdkConfig: SDKConfiguration;
    position?: 'left' | 'right';
    size?: 'small' | 'medium' | 'large';
    theme?: 'light' | 'dark' | 'auto';
    className?: string;
    onError?: (error: Error) => void;
    onMorePreferencesClick?: () => void;
}

export declare const PreferencesView: default_2.FC<PreferencesViewProps>;

export declare interface PreferencesViewProps {
    preferences: NotificationPreferences;
    onPreferenceChange: (key: string, value: any) => void;
    onBack: () => void;
    isLoading: boolean;
    onMorePreferencesClick?: () => void;
    specificPreferences?: WorkflowSubscription[];
    onLoadMoreSpecific?: () => void;
    hasMoreSpecific?: boolean;
    isListLoading?: boolean;
}

export declare interface SDKConfiguration {
    apiKey: string;
    baseUrl: string;
    subscriberId: string;
    tenantId: string;
    environmentId: string;
    environment: 'development' | 'staging' | 'production';
}

export { SDKNotification }

export declare interface TestGenerators {
    notification: () => Notification_2;
    preferences: () => NotificationPreferences;
    sdkConfig: () => SDKConfiguration;
    widgetState: () => WidgetState;
}

export declare const VERSION = "3.0.0";

export declare interface WebSocketEvent {
    type: 'notification_received' | 'notification_updated' | 'notification_deleted' | 'preferences_updated';
    data: any;
    timestamp: Date;
}

export declare const WIDGET_NAME = "@edusight/notification-widget";

export declare type WidgetAction = {
    type: 'SET_NOTIFICATIONS';
    payload: Notification_2[];
} | {
    type: 'ADD_NOTIFICATION';
    payload: Notification_2;
} | {
    type: 'UPDATE_NOTIFICATION';
    payload: {
        id: string;
        updates: Partial<Notification_2>;
    };
} | {
    type: 'DELETE_NOTIFICATION';
    payload: string;
} | {
    type: 'SET_PREFERENCES';
    payload: NotificationPreferences;
} | {
    type: 'SET_UI_STATE';
    payload: Partial<WidgetState['ui']>;
} | {
    type: 'SET_WEBSOCKET_STATE';
    payload: Partial<WidgetState['websocket']>;
};

export declare interface WidgetError extends Error {
    type: WidgetErrorType;
    originalError?: Error;
    context?: Record<string, any>;
}

export declare type WidgetErrorType = 'SDK_CONNECTION_ERROR' | 'WEBSOCKET_ERROR' | 'API_ERROR' | 'COMPONENT_ERROR' | 'NETWORK_ERROR';

export declare interface WidgetState {
    notifications: Notification_2[];
    unreadCount: number;
    preferences: NotificationPreferences;
    ui: {
        isOpen: boolean;
        currentView: 'notifications' | 'preferences';
        selectedNotifications: string[];
        isLoading: boolean;
        error: Error | null;
    };
    websocket: {
        connected: boolean;
        reconnecting: boolean;
    };
}

export declare interface WorkflowSubscription {
    workflowId: string;
    name: string;
    enabled: boolean;
    channels: NotificationChannels;
}

export { }
