import { Component } from 'react';
import { default as default_2 } from 'react';
import { ForwardRefExoticComponent } from 'react';
import { JSX as JSX_2 } from 'react/jsx-runtime';
import { NiceSize } from '@nice2dev/ui-core';
import { NiceStandardProps } from '@nice2dev/ui-core';
import { NiceVariant } from '@nice2dev/ui-core';
import { RefAttributes } from 'react';

export declare const alertIcons: Record<string, default_2.ReactNode>;

export declare const NiceAlert: default_2.FC<NiceAlertProps>;

/** Props for the {@link NiceAlert} component — a status message bar (info/success/warning/error). */
export declare interface NiceAlertProps extends NiceStandardProps {
    /** Alert size. */
    size?: NiceSize;
    /** Visual variant determining color and icon. */
    variant?: 'info' | 'success' | 'warning' | 'error';
    /** Bold title text. */
    title?: string;
    /** Alert body content. */
    children: default_2.ReactNode;
    /** Show a dismiss (✕) button. */
    closable?: boolean;
    /** Called when the dismiss button is clicked. */
    onClose?: () => void;
    /** Custom icon overriding the default variant icon. */
    icon?: default_2.ReactNode;
}

export declare const NiceConfirmDialog: default_2.FC<NiceConfirmDialogProps>;

/** Props for the {@link NiceConfirmDialog} component — a confirmation modal with accept / reject buttons. */
export declare interface NiceConfirmDialogProps extends NiceStandardProps {
    /** Size variant. */
    size?: NiceSize;
    /** Whether the dialog is visible. */
    visible: boolean;
    /** Confirmation message */
    message: default_2.ReactNode;
    /** Dialog header/title */
    header?: string;
    /** Icon displayed next to the message */
    icon?: default_2.ReactNode;
    /** Variant affects icon color and accept button style */
    variant?: 'info' | 'warning' | 'error' | 'success';
    /** Label for accept button */
    acceptLabel?: string;
    /** Label for reject button */
    rejectLabel?: string;
    /** Called when user accepts */
    onAccept: () => void;
    /** Called when user rejects or closes */
    onReject: () => void;
    /** Close on overlay click (default: false) */
    closeOnOverlay?: boolean;
    /** Close on Escape key (default: true) */
    closeOnEscape?: boolean;
}

/** Cookie category types for the {@link NiceCookieConsent} banner. */
declare type NiceCookieCategory = 'necessary' | 'analytics' | 'marketing' | 'preferences';

export declare const NiceCookieConsent: ForwardRefExoticComponent<NiceCookieConsentProps & RefAttributes<HTMLDivElement>>;

/** Props for the {@link NiceCookieConsent} component — a GDPR-style cookie consent banner with category toggles. */
export declare interface NiceCookieConsentProps extends NiceStandardProps {
    /** Show the banner when `true`. */
    visible?: boolean;
    /** Called when the user accepts all categories. */
    onAcceptAll?: () => void;
    /** Called when the user rejects all non-necessary categories. */
    onRejectAll?: () => void;
    /** Called when the user saves custom category selections. */
    onSave?: (categories: Record<NiceCookieCategory, boolean>) => void;
    /** Which cookie categories to show. */
    categories?: NiceCookieCategory[];
    /** Default toggle states for each category. */
    defaults?: Partial<Record<NiceCookieCategory, boolean>>;
    /** Banner position. */
    position?: 'bottom' | 'top' | 'center';
    /** Size preset. */
    size?: NiceSize;
    /** Link to privacy / cookie policy page. */
    policyUrl?: string;
    /** Show the category details section. */
    showDetails?: boolean;
}

export declare const NiceDrawer: default_2.FC<NiceDrawerProps>;

/** Props for the {@link NiceDrawer} component — a slide-in panel from any edge. */
export declare interface NiceDrawerProps extends NiceStandardProps {
    /** Whether the drawer is open. */
    open: boolean;
    /** Called when the user requests to close. */
    onClose: () => void;
    /** Drawer header title. */
    title?: string;
    /** Edge from which the drawer slides in. */
    position?: 'left' | 'right' | 'top' | 'bottom';
    /** Width/height preset. */
    size?: NiceSize;
    /** Drawer body content. */
    children: default_2.ReactNode;
    /** Content rendered in the drawer footer. */
    footer?: default_2.ReactNode;
    /** Custom transition duration in ms */
    transitionDuration?: number;
}

/**
 * {@link NiceErrorBoundary} — React error boundary with customizable fallback,
 * retry mechanism, and error reporting callback.
 */
export declare class NiceErrorBoundary extends Component<NiceErrorBoundaryProps, NiceErrorBoundaryState> {
    static displayName: string;
    state: NiceErrorBoundaryState;
    static getDerivedStateFromError(error: Error): NiceErrorBoundaryState;
    componentDidCatch(error: Error, errorInfo: default_2.ErrorInfo): void;
    handleReset: () => void;
    render(): string | number | boolean | Iterable<default_2.ReactNode> | JSX_2.Element | null | undefined;
}

/** Props for the {@link NiceErrorBoundary} component. */
export declare interface NiceErrorBoundaryProps {
    /** Custom fallback UI. If not provided, a default error panel is shown. */
    fallback?: default_2.ReactNode | ((error: Error, reset: () => void) => default_2.ReactNode);
    /** Fires when an error is caught. */
    onError?: (error: Error, errorInfo: default_2.ErrorInfo) => void;
    /** Whether to show a retry button in the default fallback. */
    showRetry?: boolean;
    /** Label for the retry button. */
    retryLabel?: string;
    /** Title for the default fallback. */
    title?: string;
    /** Child components to wrap. */
    children: default_2.ReactNode;
}

declare interface NiceErrorBoundaryState {
    hasError: boolean;
    error: Error | null;
}

export declare const NiceLoginForm: ForwardRefExoticComponent<NiceLoginFormProps & RefAttributes<HTMLFormElement>>;

/** Props for the {@link NiceLoginForm} component — a pre-built login form with username, password, remember-me, and social links. */
export declare interface NiceLoginFormProps extends NiceStandardProps {
    /** Called with credentials on form submit. */
    onSubmit?: (credentials: {
        username: string;
        password: string;
        rememberMe: boolean;
    }) => void;
    /** Forgot-password link handler. */
    onForgotPassword?: () => void;
    /** Register link handler. */
    onRegister?: () => void;
    /** Show a loading spinner on the submit button. */
    loading?: boolean;
    /** Error message displayed above the form. */
    error?: string;
    /** Visual variant. */
    variant?: NiceVariant;
    /** Size preset. */
    size?: NiceSize;
    /** Show “Remember me” checkbox. */
    showRememberMe?: boolean;
    /** Show “Forgot password?” link. */
    showForgotPassword?: boolean;
    /** Show a “Register” link. */
    showRegister?: boolean;
    /** Form title. */
    title?: string;
    /** Logo element above the title. */
    logo?: React.ReactNode;
    /** Username field label. */
    usernameLabel?: string;
    /** Password field label. */
    passwordLabel?: string;
    /** Username input placeholder. */
    usernamePlaceholder?: string;
    /** Password input placeholder. */
    passwordPlaceholder?: string;
}

export declare const NiceModal: default_2.FC<NiceModalProps>;

/** Props for the {@link NiceModal} component — a dialog overlay with focus trapping. */
export declare interface NiceModalProps extends NiceStandardProps {
    /** Whether the modal is currently visible. */
    open: boolean;
    /** Called when the user requests to close the modal. */
    onClose: () => void;
    /** Title rendered in the modal header. */
    title?: string;
    /** Width preset. */
    size?: NiceSize;
    /** Modal body content. */
    children: default_2.ReactNode;
    /** Content rendered in the modal footer (actions, buttons). */
    footer?: default_2.ReactNode;
    /** Close on overlay/backdrop click (default `true`). */
    closeOnOverlay?: boolean;
    /** Close on Escape key (default `true`). */
    closeOnEscape?: boolean;
    /** Allow toggling fullscreen mode */
    fullscreenable?: boolean;
    /** Stacking order for multiple modals */
    zIndex?: number;
}

export declare const NiceOfflineBanner: default_2.FC<NiceOfflineBannerProps>;

export declare interface NiceOfflineBannerProps extends NiceStandardProps {
    size?: NiceSize;
    message?: string;
    variant?: 'warning' | 'error';
    icon?: default_2.ReactNode;
}

export declare const NiceRetryPanel: default_2.FC<NiceRetryPanelProps>;

export declare interface NiceRetryPanelProps extends NiceStandardProps {
    size?: NiceSize;
    error: string | Error;
    onRetry: () => void;
    retryLabel?: string;
    title?: string;
    /** Auto-retry interval in seconds. Disabled when 0 or undefined. */
    autoRetrySeconds?: number;
    variant?: 'info' | 'warning' | 'error';
    icon?: default_2.ReactNode;
}

export declare const NiceTimeoutFeedback: default_2.FC<NiceTimeoutFeedbackProps>;

export declare interface NiceTimeoutFeedbackProps extends NiceStandardProps {
    size?: NiceSize;
    timeoutMs?: number;
    slowThresholdMs?: number;
    onTimeout?: () => void;
    onRetry?: () => void;
    autoRetry?: boolean;
    autoRetryCount?: number;
    showProgress?: boolean;
    slowMessage?: string;
    timeoutMessage?: string;
    children: default_2.ReactNode;
    loading: boolean;
}

export declare const NiceToastContainer: default_2.FC<ToastContainerProps>;

/** Data object describing a single toast notification. */
export declare interface NiceToastItem {
    /** Unique identifier for the toast. */
    id: string;
    /** Visual variant. */
    variant: 'info' | 'success' | 'warning' | 'error';
    /** Optional bold title. */
    title?: string;
    /** Toast body text. */
    message: string;
    /** Auto-dismiss delay in ms. Omit to keep until manually dismissed. */
    duration?: number;
}

declare interface ToastContainerProps {
    toasts: NiceToastItem[];
    onDismiss: (id: string) => void;
    position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'top-center';
}

export declare function useNiceToast(): {
    toasts: NiceToastItem[];
    dismiss: (id: string) => void;
    info: (msg: string, opts?: {
        title?: string;
        duration?: number;
    }) => string;
    success: (msg: string, opts?: {
        title?: string;
        duration?: number;
    }) => string;
    warning: (msg: string, opts?: {
        title?: string;
        duration?: number;
    }) => string;
    error: (msg: string, opts?: {
        title?: string;
        duration?: number;
    }) => string;
};

export { }
