import { default as default_2 } from 'react';
import { ForwardRefExoticComponent } from 'react';
import { NiceBaseProps } from '@nice2dev/ui-core';
import { NiceSize } from '@nice2dev/ui-core';
import { ReactNode } from 'react';
import { RefAttributes } from 'react';

export declare const NiceActionSheet: default_2.FC<NiceActionSheetProps>;

/** An action item in the {@link NiceActionSheet}. */
declare interface NiceActionSheetItem {
    /** Button text. */
    text: string;
    /** Optional leading icon. */
    icon?: default_2.ReactNode;
    /** Visual type (danger shows in red). */
    type?: 'normal' | 'danger';
    /** Disable the item. */
    disabled?: boolean;
    /** Click handler. */
    onClick?: () => void;
}

/** Props for the {@link NiceActionSheet} component — a mobile-style bottom action sheet. */
export declare interface NiceActionSheetProps extends NiceBaseProps {
    /** Whether the sheet is visible. */
    visible: boolean;
    /** Called when the sheet is dismissed. */
    onClose: () => void;
    /** Optional header title. */
    title?: string;
    /** Action items. */
    items: NiceActionSheetItem[];
    /** Show a cancel button at the bottom. */
    showCancelButton?: boolean;
    /** Cancel button text. */
    cancelText?: string;
}

export declare const NiceBlockUI: default_2.ForwardRefExoticComponent<NiceBlockUIProps & default_2.RefAttributes<HTMLDivElement>>;

/** Props for the {@link NiceBlockUI} component — an overlay that blocks user interaction on its children. */
export declare interface NiceBlockUIProps extends NiceBaseProps {
    /** Block the content when `true`. */
    blocked: boolean;
    /** Custom overlay message or spinner. */
    message?: default_2.ReactNode;
    /** Content to be blocked. */
    children: default_2.ReactNode;
}

/**
 * Mobile-first bottom sheet component.
 * Supports drag-to-dismiss and snap points.
 */
export declare const NiceBottomSheet: default_2.FC<NiceBottomSheetProps>;

declare interface NiceBottomSheetProps extends NiceOverlayBaseProps {
    /** Sheet content */
    children: default_2.ReactNode;
    /** Sheet title */
    title?: string;
    /** Show drag handle (default true) */
    showHandle?: boolean;
    /** Snap points as percentages of viewport height (default [0.5, 0.9]) */
    snapPoints?: number[];
    /** Initial snap point index (default 0) */
    initialSnap?: number;
    /** Allow full expansion (default true) */
    expandable?: boolean;
    /** Enable haptic feedback on snap (default true) */
    hapticFeedback?: boolean;
}

export declare const NiceBox: default_2.FC<NiceBoxProps>;

/** Props for the {@link NiceBox} component — a flex-based layout container. */
export declare interface NiceBoxProps extends NiceBaseProps {
    /** Flex direction. */
    direction?: 'row' | 'column';
    /** Cross-axis alignment. */
    align?: 'flex-start' | 'center' | 'flex-end' | 'stretch';
    /** Main-axis alignment. */
    justify?: 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly';
    /** Allow wrapping. */
    wrap?: boolean;
    /** Gap between children (px or CSS value). */
    gap?: number | string;
    /** CSS flex shorthand. */
    flex?: number | string;
    /** Box content. */
    children?: default_2.ReactNode;
}

export declare interface NiceCommand {
    id: string;
    label: string;
    action: () => void | Promise<void>;
    category?: string;
    shortcut?: string;
    icon?: ReactNode;
    description?: string;
    keywords?: string[];
    disabled?: boolean;
    hidden?: boolean;
}

declare interface NiceCommandPaletteContextValue {
    registerCommand: (command: NiceCommand) => void;
    unregisterCommand: (id: string) => void;
    registerCommands: (commands: NiceCommand[]) => void;
    open: () => void;
    close: () => void;
    toggle: () => void;
    isOpen: boolean;
    executeCommand: (id: string) => void;
}

export declare interface NiceCommandPaletteProps {
    /** Placeholder text for the search input */
    placeholder?: string;
    /** Maximum items shown before scrolling */
    maxVisible?: number;
    /** Maximum recent commands to remember */
    maxRecent?: number;
    /** Custom class name */
    className?: string;
    /** Custom empty state text */
    emptyText?: string;
    /** Close on action execution */
    closeOnAction?: boolean;
    /** Called when palette opens */
    onOpen?: () => void;
    /** Called when palette closes */
    onClose?: () => void;
}

export declare const NiceCommandPaletteProvider: default_2.FC<NiceCommandPaletteProviderProps>;

export declare interface NiceCommandPaletteProviderProps extends NiceCommandPaletteProps {
    children: ReactNode;
    /** Pre-registered commands */
    commands?: NiceCommand[];
}

/**
 * Context menu that appears on right-click.
 */
export declare const NiceContextMenu: default_2.FC<NiceContextMenuProps>;

declare interface NiceContextMenuItem {
    key: string;
    label: default_2.ReactNode;
    icon?: default_2.ReactNode;
    disabled?: boolean;
    danger?: boolean;
    divider?: boolean;
    onClick?: () => void;
    children?: NiceContextMenuItem[];
}

declare interface NiceContextMenuProps {
    /** Menu items */
    items: NiceContextMenuItem[];
    /** Content to wrap with context menu */
    children: default_2.ReactNode;
    /** Callback when menu opens */
    onOpen?: () => void;
    /** Callback when menu closes */
    onClose?: () => void;
    /** Additional className for menu */
    className?: string;
}

/**
 * Drawer component that slides in from screen edges.
 * Supports swipe-to-close on touch devices.
 */
export declare const NiceDrawer: default_2.FC<NiceOverlayDrawerProps>;

export declare const NiceLoadPanel: default_2.FC<NiceLoadPanelProps>;

/** Props for the {@link NiceLoadPanel} component — a full-screen or container-bound loading overlay. */
export declare interface NiceLoadPanelProps extends NiceBaseProps {
    /** Show the panel when `true`. */
    visible: boolean;
    /** Loading message text. */
    message?: string;
    /** Container element to confine the overlay. */
    container?: default_2.RefObject<HTMLElement | null>;
    /** Show a spinning indicator. */
    showIndicator?: boolean;
    /** Show a semi-transparent backdrop. */
    shading?: boolean;
}

/**
 * Modal component with focus trap, backdrop, and keyboard handling.
 */
export declare const NiceModal: default_2.FC<NiceOverlayModalProps>;

export declare const NiceModalBody: default_2.FC<NiceModalBodyProps>;

declare interface NiceModalBodyProps {
    children: default_2.ReactNode;
    className?: string;
}

export declare const NiceModalFooter: default_2.FC<NiceModalFooterProps>;

declare interface NiceModalFooterProps {
    children: default_2.ReactNode;
    className?: string;
}

export declare const NiceModalHeader: default_2.FC<NiceModalHeaderProps>;

declare interface NiceModalHeaderProps {
    children: default_2.ReactNode;
    /** Show close button */
    showClose?: boolean;
    /** Close handler (required if showClose) */
    onClose?: () => void;
    className?: string;
}

export declare interface NiceOverlayBaseProps {
    /** Whether the overlay is visible */
    open: boolean;
    /** Callback when overlay should close */
    onClose: () => void;
    /** Whether to close on backdrop click (default true) */
    closeOnBackdropClick?: boolean;
    /** Whether to close on Escape key (default true) */
    closeOnEscape?: boolean;
    /** Z-index for the overlay (default 1000) */
    zIndex?: number;
    /** Additional className */
    className?: string;
    /** Additional styles */
    style?: default_2.CSSProperties;
}

export declare interface NiceOverlayDrawerProps extends NiceOverlayBaseProps {
    /** Drawer content */
    children: default_2.ReactNode;
    /** Position the drawer appears from */
    position?: 'left' | 'right' | 'top' | 'bottom';
    /** Drawer size (width for left/right, height for top/bottom) */
    size?: number | string;
    /** Drawer title (for aria-label) */
    title?: string;
    /** Enable swipe to close (default true on touch devices) */
    swipeToClose?: boolean;
}

export declare interface NiceOverlayModalProps extends NiceOverlayBaseProps {
    /** Modal content */
    children: default_2.ReactNode;
    /** Modal title (for aria-label) */
    title?: string;
    /** Modal size */
    size?: 'sm' | 'md' | 'lg' | 'xl' | 'full';
    /** Disable focus trap (default false) */
    disableFocusTrap?: boolean;
    /** Disable body scroll when modal is open (default true) */
    disableBodyScroll?: boolean;
}

/**
 * Popover component with positioning and various trigger modes.
 */
export declare const NiceOverlayPopover: default_2.FC<NicePopoverProps_2>;

export declare const NicePopover: default_2.FC<NicePopoverProps>;

/** Placement of the {@link NicePopover} relative to its target. */
declare type NicePopoverPosition = 'top' | 'bottom' | 'left' | 'right';

/** Props for the {@link NicePopover} component — a positioned popup attached to a target element. */
export declare interface NicePopoverProps extends NiceBaseProps {
    /** Whether the popover is visible. */
    visible: boolean;
    /** Called when the popover should close. */
    onClose: () => void;
    /** Reference to the target element the popover is anchored to. */
    targetRef: default_2.RefObject<HTMLElement | null>;
    /** Placement relative to target. */
    position?: NicePopoverPosition;
    /** Optional header title. */
    title?: string;
    /** Show an arrow pointing toward the target. */
    showArrow?: boolean;
    /** Popover width. */
    width?: number | string;
    /** Popover content. */
    children?: default_2.ReactNode;
}

declare interface NicePopoverProps_2 {
    /** Trigger element */
    trigger: default_2.ReactNode;
    /** Popover content */
    children: default_2.ReactNode;
    /** Placement relative to trigger */
    placement?: PopoverPlacement;
    /** Open trigger mode */
    triggerMode?: 'click' | 'hover' | 'manual';
    /** Controlled open state */
    open?: boolean;
    /** Callback when open state changes */
    onOpenChange?: (open: boolean) => void;
    /** Hover delay in ms */
    hoverDelay?: number;
    /** Offset from trigger (px) */
    offset?: number;
    /** Additional className */
    className?: string;
    /** Arrow visible */
    showArrow?: boolean;
}

export declare const NiceResizable: default_2.FC<NiceResizableProps>;

/** Props for the {@link NiceResizable} component — a wrapper that adds drag resize handles to its children. */
export declare interface NiceResizableProps extends NiceBaseProps {
    /** Current width in px. */
    width?: number;
    /** Current height in px. */
    height?: number;
    /** Minimum width in px. */
    minWidth?: number;
    /** Minimum height in px. */
    minHeight?: number;
    /** Maximum width in px. */
    maxWidth?: number;
    /** Maximum height in px. */
    maxHeight?: number;
    /** Which handles to show. */
    handles?: NiceResizeHandle[];
    /** Called when the element is resized. */
    onResize?: (size: {
        width: number;
        height: number;
    }) => void;
    /** Content to be made resizable. */
    children?: default_2.ReactNode;
}

/** Resize handle position for the {@link NiceResizable} component. */
declare type NiceResizeHandle = 'top' | 'right' | 'bottom' | 'left' | 'topRight' | 'bottomRight' | 'bottomLeft' | 'topLeft';

export declare const NiceResponsiveBox: default_2.FC<NiceResponsiveBoxProps>;

/** A flex item within the {@link NiceResponsiveBox}. */
declare interface NiceResponsiveBoxItem {
    /** Flex grow ratio. */
    ratio?: number;
    /** Fixed base size (px or CSS value). */
    baseSize?: number | string;
    /** Flex shrink factor. */
    shrink?: number;
    /** Item content. */
    children: default_2.ReactNode;
}

/** Props for the {@link NiceResponsiveBox} component — a flex container with configurable ratios and base sizes. */
export declare interface NiceResponsiveBoxProps extends NiceBaseProps {
    /** Flex direction. */
    direction?: 'row' | 'column';
    /** Flex items. */
    items: NiceResponsiveBoxItem[];
    /** Gap between items (px or CSS value). */
    gap?: number | string;
}

export declare const NiceScrollView: default_2.FC<NiceScrollViewProps>;

/** Props for the {@link NiceScrollView} component — a styled scrollable container with configurable scrollbar visibility. */
export declare interface NiceScrollViewProps extends NiceBaseProps {
    /** Scroll direction. */
    direction?: 'horizontal' | 'vertical' | 'both';
    /** When to show scrollbars. */
    showScrollbar?: 'always' | 'onInteraction' | 'never';
    /** Container width (px or CSS value). */
    width?: number | string;
    /** Container height (px or CSS value). */
    height?: number | string;
    /** Called on scroll. */
    onScroll?: (e: default_2.UIEvent<HTMLDivElement>) => void;
    /** Scrollable content. */
    children?: default_2.ReactNode;
}

export declare const NiceTutorial: default_2.FC<NiceTutorialProps>;

/** Props for the {@link NiceTutorial} component — a guided walkthrough overlay with step-by-step highlighting. */
export declare interface NiceTutorialProps {
    /** Array of ordered tutorial steps */
    steps: NiceTutorialStep[];
    /** Starts the tutorial when true */
    active: boolean;
    /** Called when tutorial finishes (last step completed) */
    onFinish?: () => void;
    /** Called when tutorial is skipped */
    onSkip?: () => void;
    /** Called on step change */
    onStepChange?: (stepIndex: number) => void;
    /** Close on pressing Escape (default true) */
    closeOnEscape?: boolean;
    /** Close on overlay click (default false) */
    closeOnOverlayClick?: boolean;
    /** Show step progress indicator (default true) */
    showProgress?: boolean;
    /** Show skip button (default true) */
    showSkipButton?: boolean;
    /** Custom labels */
    labels?: {
        next?: string;
        back?: string;
        finish?: string;
        skip?: string;
        stepOf?: string;
    };
    /** Animation duration in ms (default 300) */
    animationDuration?: number;
    /** Overlay opacity (default 0.6) */
    overlayOpacity?: number;
    /** Z-index for the overlay (default 10000) */
    zIndex?: number;
}

export declare const NiceTutorialProvider: default_2.FC<NiceTutorialProviderProps>;

/** Props for the {@link NiceTutorialProvider} component — a React context provider for imperative tutorial control. */
export declare interface NiceTutorialProviderProps {
    /** Application content. */
    children: default_2.ReactNode;
}

/** A single step in a {@link NiceTutorial} flow. */
export declare interface NiceTutorialStep {
    /** CSS selector or ref-based query to find the target element */
    target: string;
    /** Step title displayed in the tooltip */
    title: string;
    /** Step description / instructions (supports HTML) */
    content: string;
    /** Tooltip placement relative to target element */
    placement?: 'top' | 'bottom' | 'left' | 'right' | 'auto';
    /** Highlight inset padding around the target (default 8) */
    highlightPadding?: number;
    /** If true, wait for user action (e.g. click) before advancing */
    waitForAction?: boolean;
    /** Show an arrow pointing from tooltip to target (default true) */
    showArrow?: boolean;
    /** Called when this step becomes active */
    onEnter?: () => void;
    /** Called when this step is left */
    onLeave?: () => void;
    /** Optional event on target that auto-advances to next step */
    advanceOn?: {
        event: string;
    };
    /** If true, scroll target into view on step entry */
    scrollIntoView?: boolean;
    /** Disable interaction with highlighted element (no click-through) */
    disableInteraction?: boolean;
}

export declare const NiceWindow: ForwardRefExoticComponent<NiceWindowProps & RefAttributes<HTMLDivElement>>;

export declare const NiceWindowManager: ForwardRefExoticComponent<NiceWindowManagerProps & RefAttributes<HTMLDivElement>>;

/** Props for the {@link NiceWindowManager} component — a multi-window manager with taskbar and z-index stacking. */
export declare interface NiceWindowManagerProps extends NiceBaseProps {
    /** Managed window entries. Optional when children (NiceWindow elements) are provided. */
    windows?: NiceWindowState_2[];
    /** Window children (NiceWindow elements). Used when `windows` is not provided. */
    children?: React.ReactNode;
    /** Called when the window list changes (drag, resize, minimize, etc.). */
    onChange?: (windows: NiceWindowState_2[]) => void;
    /** Called when a window is closed. */
    onClose?: (key: string) => void;
    /** Called when a window gains focus. */
    onFocus?: (key: string) => void;
    /** Show a taskbar at the bottom with window buttons. */
    showTaskbar?: boolean;
    /** Size preset. */
    size?: NiceSize;
}

/** X/Y coordinates of a {@link NiceWindow}. */
export declare interface NiceWindowPosition {
    /** Horizontal offset in px. */
    x: number;
    /** Vertical offset in px. */
    y: number;
}

/** Props for the {@link NiceWindow} component — a draggable, resizable, snappable desktop window with title bar controls. */
export declare interface NiceWindowProps extends NiceBaseProps {
    /** Unique window identifier. Auto-generated if not provided. */
    windowKey?: string;
    /** Window title. */
    title: string;
    /** Icon displayed in title bar */
    icon?: React.ReactNode;
    /** Window content */
    children?: React.ReactNode;
    /** Footer content */
    footer?: React.ReactNode;
    /** Initial or controlled x position */
    x?: number;
    /** Initial or controlled y position */
    y?: number;
    /** Convenience initial position object — alternative to passing `x` and `y` separately. */
    defaultPosition?: {
        x: number;
        y: number;
    };
    /** Initial or controlled width */
    width?: number;
    /** Initial or controlled height */
    height?: number;
    /** Minimum width */
    minWidth?: number;
    /** Minimum height */
    minHeight?: number;
    /** Maximum width */
    maxWidth?: number;
    /** Maximum height */
    maxHeight?: number;
    /** Z-index for stacking */
    zIndex?: number;
    /** Allow closing */
    closable?: boolean;
    /** Allow minimizing */
    minimizable?: boolean;
    /** Allow maximizing */
    maximizable?: boolean;
    /** Allow full screen */
    fullscreenable?: boolean;
    /** Allow pinning (always on top) */
    pinnable?: boolean;
    /** Allow resizing */
    resizable?: boolean;
    /** Allow dragging */
    draggable?: boolean;
    /** Allow snap to edges */
    snappable?: boolean;
    /** Snap threshold in px */
    snapThreshold?: number;
    /** Whether minimized */
    minimized?: boolean;
    /** Whether maximized */
    maximized?: boolean;
    /** Whether fullscreen */
    fullscreen?: boolean;
    /** Whether pinned (always on top) */
    pinned?: boolean;
    /** Whether focused/active */
    focused?: boolean;
    onClose?: (key: string) => void;
    onMinimize?: (key: string) => void;
    onMaximize?: (key: string, maximized: boolean) => void;
    onFullscreen?: (key: string, fullscreen: boolean) => void;
    onPin?: (key: string, pinned: boolean) => void;
    onFocus?: (key: string) => void;
    onMove?: (key: string, position: NiceWindowPosition) => void;
    onResize?: (key: string, size: NiceWindowSize) => void;
    onSnap?: (key: string, snap: NiceWindowSnapPosition) => void;
    /** Called on double-click of title bar (toggle maximize) */
    onTitleBarDoubleClick?: (key: string) => void;
    /** Window size preset */
    size?: NiceSize;
    /** Status bar content */
    statusBar?: React.ReactNode;
    /** Additional title bar actions */
    titleBarActions?: React.ReactNode;
}

/** Dimensions of a {@link NiceWindow}. */
export declare interface NiceWindowSize {
    /** Width in px. */
    width: number;
    /** Height in px. */
    height: number;
}

/** Snap positions for the {@link NiceWindow} component. */
export declare type NiceWindowSnapPosition = 'none' | 'left' | 'right' | 'top' | 'bottom' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';

/** Full runtime state of a {@link NiceWindow}. */
export declare interface NiceWindowState {
    /** Current position. */
    position: NiceWindowPosition;
    /** Current size. */
    size: NiceWindowSize;
    /** Whether minimized. */
    minimized: boolean;
    /** Whether maximized. */
    maximized: boolean;
    /** Whether fullscreen. */
    fullscreen: boolean;
    /** Whether pinned (always-on-top). */
    pinned: boolean;
    /** Snap position. */
    snapped: NiceWindowSnapPosition;
    /** Stacking z-index. */
    zIndex: number;
    /** Whether focused. */
    focused: boolean;
}

/** A managed window entry for the {@link NiceWindowManager}. */
declare interface NiceWindowState_2 {
    /** Unique key. */
    key: string;
    /** Window title. */
    title: string;
    /** Window body content. */
    content: React.ReactNode;
    /** X position. */
    x: number;
    /** Y position. */
    y: number;
    /** Width in px. */
    width: number;
    /** Height in px. */
    height: number;
    /** Whether minimized. */
    minimized?: boolean;
    /** Whether maximized. */
    maximized?: boolean;
    /** Stacking z-index. */
    zIndex?: number;
    /** Title bar icon. */
    icon?: React.ReactNode;
    /** Allow resizing. */
    resizable?: boolean;
    /** Allow closing. */
    closable?: boolean;
    /** Allow minimizing. */
    minimizable?: boolean;
    /** Allow maximizing. */
    maximizable?: boolean;
}

declare type PopoverPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';

/** Context value provided by the {@link NiceTutorialProvider} for imperative tutorial control. */
export declare interface TutorialContextValue {
    /** Start a tutorial with the given steps */
    startTutorial: (steps: NiceTutorialStep[]) => void;
    /** Stop the current tutorial */
    stopTutorial: () => void;
    /** Whether a tutorial is currently active */
    isActive: boolean;
    /** Current step index */
    currentStep: number;
    /** Go to next step */
    nextStep: () => void;
    /** Go to previous step */
    prevStep: () => void;
    /** Go to a specific step */
    goToStep: (index: number) => void;
}

export declare function useCommandPalette(): NiceCommandPaletteContextValue;

export declare function useRegisterCommands(commands: NiceCommand[]): void;

export { }
