import * as TuiTypes from '@unblessed/node';
export * from '@unblessed/node';

/**
 * @unblessed/blessed - 100% backward compatible blessed API
 *
 * This package wraps @unblessed/node to provide the exact same API as the original
 * blessed library. It's a drop-in replacement for users migrating from blessed.
 */

/**
 * WidgetFactory type - matches old blessed pattern
 * Factory function + class constructor + prototype
 */
type WidgetFactory<T> = {
    (options?: any): T;
    class: new (options?: any) => T;
    prototype: T;
};
/**
 * BlessedFunction interface - matches old blessed structure
 */
interface BlessedFunction {
    (...args: any[]): TuiTypes.Program;
    program(...args: any[]): TuiTypes.Program;
    tput(...args: any[]): TuiTypes.Tput;
    Program: typeof TuiTypes.Program;
    Tput: typeof TuiTypes.Tput;
    colors: typeof TuiTypes.colors;
    unicode: typeof TuiTypes.unicode;
    helpers: typeof TuiTypes & {
        sprintf: typeof TuiTypes.sprintf;
        tryRead: typeof TuiTypes.tryRead;
    };
    Node: WidgetFactory<TuiTypes.Node>;
    Screen: WidgetFactory<TuiTypes.Screen>;
    Element: WidgetFactory<TuiTypes.Element>;
    Box: WidgetFactory<TuiTypes.Box>;
    Text: WidgetFactory<TuiTypes.Text>;
    Line: WidgetFactory<TuiTypes.Line>;
    ScrollableBox: WidgetFactory<TuiTypes.ScrollableBox>;
    ScrollableText: WidgetFactory<TuiTypes.ScrollableText>;
    BigText: WidgetFactory<TuiTypes.BigText>;
    List: WidgetFactory<TuiTypes.List>;
    Form: WidgetFactory<TuiTypes.Form>;
    Input: WidgetFactory<TuiTypes.Input>;
    Textarea: WidgetFactory<TuiTypes.Textarea>;
    Textbox: WidgetFactory<TuiTypes.Textbox>;
    Button: WidgetFactory<TuiTypes.Button>;
    ProgressBar: WidgetFactory<TuiTypes.ProgressBar>;
    FileManager: WidgetFactory<TuiTypes.FileManager>;
    Checkbox: WidgetFactory<TuiTypes.Checkbox>;
    RadioSet: WidgetFactory<TuiTypes.RadioSet>;
    RadioButton: WidgetFactory<TuiTypes.RadioButton>;
    Prompt: WidgetFactory<TuiTypes.Prompt>;
    Question: WidgetFactory<TuiTypes.Question>;
    Message: WidgetFactory<TuiTypes.Message>;
    Loading: WidgetFactory<TuiTypes.Loading>;
    Listbar: WidgetFactory<TuiTypes.Listbar>;
    Log: WidgetFactory<TuiTypes.Log>;
    Table: WidgetFactory<TuiTypes.Table>;
    ListTable: WidgetFactory<TuiTypes.ListTable>;
    Image: WidgetFactory<TuiTypes.Image>;
    ANSIImage: WidgetFactory<TuiTypes.ANSIImage>;
    OverlayImage: WidgetFactory<TuiTypes.OverlayImage>;
    Layout: WidgetFactory<TuiTypes.Layout>;
    node: WidgetFactory<TuiTypes.Node>;
    screen: WidgetFactory<TuiTypes.Screen>;
    element: WidgetFactory<TuiTypes.Element>;
    box: WidgetFactory<TuiTypes.Box>;
    text: WidgetFactory<TuiTypes.Text>;
    line: WidgetFactory<TuiTypes.Line>;
    scrollablebox: WidgetFactory<TuiTypes.ScrollableBox>;
    scrollabletext: WidgetFactory<TuiTypes.ScrollableText>;
    bigtext: WidgetFactory<TuiTypes.BigText>;
    list: WidgetFactory<TuiTypes.List>;
    form: WidgetFactory<TuiTypes.Form>;
    input: WidgetFactory<TuiTypes.Input>;
    textarea: WidgetFactory<TuiTypes.Textarea>;
    textbox: WidgetFactory<TuiTypes.Textbox>;
    button: WidgetFactory<TuiTypes.Button>;
    progressbar: WidgetFactory<TuiTypes.ProgressBar>;
    filemanager: WidgetFactory<TuiTypes.FileManager>;
    checkbox: WidgetFactory<TuiTypes.Checkbox>;
    radioset: WidgetFactory<TuiTypes.RadioSet>;
    radiobutton: WidgetFactory<TuiTypes.RadioButton>;
    prompt: WidgetFactory<TuiTypes.Prompt>;
    question: WidgetFactory<TuiTypes.Question>;
    message: WidgetFactory<TuiTypes.Message>;
    loading: WidgetFactory<TuiTypes.Loading>;
    listbar: WidgetFactory<TuiTypes.Listbar>;
    log: WidgetFactory<TuiTypes.Log>;
    table: WidgetFactory<TuiTypes.Table>;
    listtable: WidgetFactory<TuiTypes.ListTable>;
    image: WidgetFactory<TuiTypes.Image>;
    ansiimage: WidgetFactory<TuiTypes.ANSIImage>;
    overlayimage: WidgetFactory<TuiTypes.OverlayImage>;
    layout: WidgetFactory<TuiTypes.Layout>;
}
/**
 * Widgets namespace - contains all widget types and options
 * Provides compatibility with @types/blessed
 */
declare namespace Widgets {
    namespace Types {
        type TTopLeft = TuiTypes.PositionValue;
        type TPosition = TuiTypes.PositionValue;
        type TAlign = TuiTypes.Alignment;
        type TMouseAction = TuiTypes.MouseAction;
        type TBorder = TuiTypes.Border;
        type TStyleBorder = TuiTypes.StyleBorder;
        type TCursor = TuiTypes.Cursor;
        type Effects = TuiTypes.Effects;
        type TStyle = TuiTypes.Style;
        type TImage = TuiTypes.ImageData;
    }
    namespace Events {
        type IMouseEventArg = TuiTypes.MouseEvent;
        type IKeyEventArg = TuiTypes.KeyEvent;
    }
    type Node = TuiTypes.Node;
    type Screen = TuiTypes.Screen;
    type BlessedElement = TuiTypes.Element;
    type Element = TuiTypes.Element;
    type BoxElement = TuiTypes.Box;
    type Box = TuiTypes.Box;
    type TextElement = TuiTypes.Text;
    type Text = TuiTypes.Text;
    type LineElement = TuiTypes.Line;
    type Line = TuiTypes.Line;
    type ScrollableBoxElement = TuiTypes.ScrollableBox;
    type ScrollableBox = TuiTypes.ScrollableBox;
    type ScrollableTextElement = TuiTypes.ScrollableText;
    type ScrollableText = TuiTypes.ScrollableText;
    type BigTextElement = TuiTypes.BigText;
    type BigText = TuiTypes.BigText;
    type ListElement = TuiTypes.List;
    type List = TuiTypes.List;
    type FormElement = TuiTypes.Form;
    type Form = TuiTypes.Form;
    type InputElement = TuiTypes.Input;
    type Input = TuiTypes.Input;
    type TextareaElement = TuiTypes.Textarea;
    type Textarea = TuiTypes.Textarea;
    type TextboxElement = TuiTypes.Textbox;
    type Textbox = TuiTypes.Textbox;
    type ButtonElement = TuiTypes.Button;
    type Button = TuiTypes.Button;
    type ProgressBarElement = TuiTypes.ProgressBar;
    type ProgressBar = TuiTypes.ProgressBar;
    type FileManagerElement = TuiTypes.FileManager;
    type FileManager = TuiTypes.FileManager;
    type CheckboxElement = TuiTypes.Checkbox;
    type Checkbox = TuiTypes.Checkbox;
    type RadioSetElement = TuiTypes.RadioSet;
    type RadioSet = TuiTypes.RadioSet;
    type RadioButtonElement = TuiTypes.RadioButton;
    type RadioButton = TuiTypes.RadioButton;
    type PromptElement = TuiTypes.Prompt;
    type Prompt = TuiTypes.Prompt;
    type QuestionElement = TuiTypes.Question;
    type Question = TuiTypes.Question;
    type MessageElement = TuiTypes.Message;
    type Message = TuiTypes.Message;
    type LoadingElement = TuiTypes.Loading;
    type Loading = TuiTypes.Loading;
    type ListbarElement = TuiTypes.Listbar;
    type Listbar = TuiTypes.Listbar;
    type Log = TuiTypes.Log;
    type TableElement = TuiTypes.Table;
    type Table = TuiTypes.Table;
    type ListTableElement = TuiTypes.ListTable;
    type ListTable = TuiTypes.ListTable;
    type ImageElement = TuiTypes.Image;
    type Image = TuiTypes.Image;
    type ANSIImageElement = TuiTypes.ANSIImage;
    type ANSIImage = TuiTypes.ANSIImage;
    type OverlayImageElement = TuiTypes.OverlayImage;
    type OverlayImage = TuiTypes.OverlayImage;
    type LayoutElement = TuiTypes.Layout;
    type Layout = TuiTypes.Layout;
    type Program = TuiTypes.Program;
    type INodeOptions = TuiTypes.NodeOptions;
    type IScreenOptions = TuiTypes.ScreenOptions;
    type ElementOptions = TuiTypes.ElementOptions;
    type ScrollableOptions = TuiTypes.ScrollableOptions;
    type ScrollableBoxOptions = TuiTypes.ScrollableBoxOptions;
    type ScrollableTextOptions = TuiTypes.ScrollableTextOptions;
    type BoxOptions = TuiTypes.BoxOptions;
    type TextOptions = TuiTypes.TextOptions;
    type LineOptions = TuiTypes.LineOptions;
    type BigTextOptions = TuiTypes.BigTextOptions;
    type ListOptions<TStyle extends TuiTypes.ListElementStyle = TuiTypes.ListElementStyle> = TuiTypes.ListOptions<TStyle>;
    type FormOptions = TuiTypes.FormOptions;
    type InputOptions = TuiTypes.InputOptions;
    type TextareaOptions = TuiTypes.TextareaOptions;
    type TextboxOptions = TuiTypes.TextboxOptions;
    type ButtonOptions = TuiTypes.ButtonOptions;
    type ProgressBarOptions = TuiTypes.ProgressBarOptions;
    type FileManagerOptions = TuiTypes.FileManagerOptions;
    type CheckboxOptions = TuiTypes.CheckboxOptions;
    type RadioSetOptions = TuiTypes.RadioSetOptions;
    type RadioButtonOptions = TuiTypes.RadioButtonOptions;
    type PromptOptions = TuiTypes.PromptOptions;
    type QuestionOptions = TuiTypes.QuestionOptions;
    type MessageOptions = TuiTypes.MessageOptions;
    type LoadingOptions = TuiTypes.LoadingOptions;
    type ListbarOptions = TuiTypes.ListbarOptions;
    type LogOptions = TuiTypes.LogOptions;
    type TableOptions = TuiTypes.TableOptions;
    type ListTableOptions = TuiTypes.ListTableOptions;
    type ImageOptions = TuiTypes.ImageOptions;
    type ANSIImageOptions = TuiTypes.ANSIImageOptions;
    type OverlayImageOptions = TuiTypes.OverlayImageOptions;
    type LayoutOptions = TuiTypes.LayoutOptions;
    type Style = TuiTypes.Style;
    type StyleBorder = TuiTypes.StyleBorder;
    type Effects = TuiTypes.Effects;
    type ListElementStyle = TuiTypes.ListElementStyle;
    type StyleListTable = TuiTypes.StyleListTable;
    type ProgressBarStyle = TuiTypes.ProgressBarStyle;
    type Border = TuiTypes.Border;
    type Padding = TuiTypes.Padding;
    type Position = TuiTypes.Position;
    type PositionCoords = TuiTypes.PositionCoords;
    type Coords = TuiTypes.Coords;
    type RenderCoords = TuiTypes.RenderCoords;
    type Cursor = TuiTypes.Cursor;
    type LabelOptions = TuiTypes.LabelOptions;
}
declare const blessed: BlessedFunction;

declare const program: (...args: any[]) => TuiTypes.Program;
declare const tput: (...args: any[]) => TuiTypes.Tput;
declare const Node: WidgetFactory<TuiTypes.Node>;
declare const Screen: WidgetFactory<TuiTypes.Screen>;
declare const Element: WidgetFactory<TuiTypes.Element>;
declare const Box: WidgetFactory<TuiTypes.Box>;
declare const Text: WidgetFactory<TuiTypes.Text>;
declare const Line: WidgetFactory<TuiTypes.Line>;
declare const ScrollableBox: WidgetFactory<TuiTypes.ScrollableBox>;
declare const ScrollableText: WidgetFactory<TuiTypes.ScrollableText>;
declare const BigText: WidgetFactory<TuiTypes.BigText>;
declare const List: WidgetFactory<TuiTypes.List>;
declare const Form: WidgetFactory<TuiTypes.Form>;
declare const Input: WidgetFactory<TuiTypes.Input>;
declare const Textarea: WidgetFactory<TuiTypes.Textarea>;
declare const Textbox: WidgetFactory<TuiTypes.Textbox>;
declare const Button: WidgetFactory<TuiTypes.Button>;
declare const ProgressBar: WidgetFactory<TuiTypes.ProgressBar>;
declare const FileManager: WidgetFactory<TuiTypes.FileManager>;
declare const Checkbox: WidgetFactory<TuiTypes.Checkbox>;
declare const RadioSet: WidgetFactory<TuiTypes.RadioSet>;
declare const RadioButton: WidgetFactory<TuiTypes.RadioButton>;
declare const Prompt: WidgetFactory<TuiTypes.Prompt>;
declare const Question: WidgetFactory<TuiTypes.Question>;
declare const Message: WidgetFactory<TuiTypes.Message>;
declare const Loading: WidgetFactory<TuiTypes.Loading>;
declare const Listbar: WidgetFactory<TuiTypes.Listbar>;
declare const Log: WidgetFactory<TuiTypes.Log>;
declare const Table: WidgetFactory<TuiTypes.Table>;
declare const ListTable: WidgetFactory<TuiTypes.ListTable>;
declare const Image: WidgetFactory<TuiTypes.Image>;
declare const ANSIImage: WidgetFactory<TuiTypes.ANSIImage>;
declare const OverlayImage: WidgetFactory<TuiTypes.OverlayImage>;
declare const Layout: WidgetFactory<TuiTypes.Layout>;
declare const node: WidgetFactory<TuiTypes.Node>;
declare const screen: WidgetFactory<TuiTypes.Screen>;
declare const element: WidgetFactory<TuiTypes.Element>;
declare const box: WidgetFactory<TuiTypes.Box>;
declare const text: WidgetFactory<TuiTypes.Text>;
declare const line: WidgetFactory<TuiTypes.Line>;
declare const scrollablebox: WidgetFactory<TuiTypes.ScrollableBox>;
declare const scrollabletext: WidgetFactory<TuiTypes.ScrollableText>;
declare const bigtext: WidgetFactory<TuiTypes.BigText>;
declare const list: WidgetFactory<TuiTypes.List>;
declare const form: WidgetFactory<TuiTypes.Form>;
declare const input: WidgetFactory<TuiTypes.Input>;
declare const textarea: WidgetFactory<TuiTypes.Textarea>;
declare const textbox: WidgetFactory<TuiTypes.Textbox>;
declare const button: WidgetFactory<TuiTypes.Button>;
declare const progressbar: WidgetFactory<TuiTypes.ProgressBar>;
declare const filemanager: WidgetFactory<TuiTypes.FileManager>;
declare const checkbox: WidgetFactory<TuiTypes.Checkbox>;
declare const radioset: WidgetFactory<TuiTypes.RadioSet>;
declare const radiobutton: WidgetFactory<TuiTypes.RadioButton>;
declare const prompt: WidgetFactory<TuiTypes.Prompt>;
declare const question: WidgetFactory<TuiTypes.Question>;
declare const message: WidgetFactory<TuiTypes.Message>;
declare const loading: WidgetFactory<TuiTypes.Loading>;
declare const listbar: WidgetFactory<TuiTypes.Listbar>;
declare const log: WidgetFactory<TuiTypes.Log>;
declare const table: WidgetFactory<TuiTypes.Table>;
declare const listtable: WidgetFactory<TuiTypes.ListTable>;
declare const image: WidgetFactory<TuiTypes.Image>;
declare const ansiimage: WidgetFactory<TuiTypes.ANSIImage>;
declare const overlayimage: WidgetFactory<TuiTypes.OverlayImage>;
declare const layout: WidgetFactory<TuiTypes.Layout>;
declare const escape: any;
declare const stripTags: any;
declare const cleanTags: any;
declare const generateTags: any;
declare const colors: any;
declare const unicode: any;
declare const helpers: typeof TuiTypes & {
    sprintf: typeof TuiTypes.sprintf;
    tryRead: typeof TuiTypes.tryRead;
};
type TTopLeft = TuiTypes.PositionValue;
type TPosition = TuiTypes.PositionValue;
type TAlign = TuiTypes.Alignment;
type TMouseAction = TuiTypes.MouseAction;
type TImage = TuiTypes.ImageData;

export { ANSIImage, BigText, type BlessedFunction, Box, Button, Checkbox, Element, FileManager, Form, Image, Input, Layout, Line, List, ListTable, Listbar, Loading, Log, Message, Node, OverlayImage, ProgressBar, Prompt, Question, RadioButton, RadioSet, Screen, ScrollableBox, ScrollableText, type TAlign, type TImage, type TMouseAction, type TPosition, type TTopLeft, Table, Text, Textarea, Textbox, type WidgetFactory, Widgets, ansiimage, bigtext, box, button, checkbox, cleanTags, colors, blessed as default, element, escape, filemanager, form, generateTags, helpers, image, input, layout, line, list, listbar, listtable, loading, log, message, node, overlayimage, program, progressbar, prompt, question, radiobutton, radioset, screen, scrollablebox, scrollabletext, stripTags, table, text, textarea, textbox, tput, unicode };
