//! Compatibility layer for migrating from Dioxus to Tairitsu
//!
//! This module provides type aliases and re-exports to ease the migration process.

// Re-export tairitsu core types
// Re-export tairitsu hooks
pub use tairitsu_hooks::{
    AnimationConfig, AnimationDirection, AnimationState, ButtonStateMachine, Context,
    EasingFunction, InteractionCallback, InteractionEvent, InteractionState, Memo, UseRef,
    provide_context, provide_context as use_context_provider, use_animation, use_callback,
    use_context, use_context as consume_context, use_context as try_consume_context, use_effect,
    use_interaction_state, use_memo, use_ref, use_signal, use_simple_animation, use_state,
};
pub use tairitsu_macros::component as derive_props;
// Re-export tairitsu macros
pub use tairitsu_macros::{Props, component, define_props, rsx};
// Re-export Event as a type alias for Dioxus compatibility
pub use tairitsu_vdom::Event;
pub use tairitsu_vdom::{
    AnimationEvent, Callback, ChangeEvent, Classes, DataTransfer, DragEvent, ElementHandle,
    EventData, EventHandle, EventHandler, FileData, FocusEvent, FormData, FormEvent, InputEvent,
    IntoAttrValue, Key, KeyboardEvent, MouseData, MouseEvent, Signal, Style, VElement, VNode,
    VNode as Element, VText, batch, create_effect,
};

/// Helper function to create an event handler
pub fn event_handler<F, T>(f: F) -> EventHandler<T>
where
    F: Fn(T) + 'static,
{
    EventHandler::new(f)
}

pub fn empty_vnode() -> VNode {
    VNode::Text(VText::new(""))
}

// Re-export styled components
// Re-export IconProps from hikari-icons for convenience
pub use hikari_icons::IconProps;

// Add ArrowProps from basic module
pub use crate::basic::ArrowProps;
// Re-export Props types from components for use in rsx! macro
// When using Component { ... } in rsx!, the macro generates Component(ComponentProps { ... })
// These types need to be in scope

// Basic component Props
pub use crate::basic::{
    BackgroundProps, BadgeProps, ButtonProps, CardActionsProps, CardContentProps, CardHeaderProps,
    CardMediaProps, CardProps, CheckboxProps, DatePickerProps, DividerProps, FileUploadProps,
    FormFieldProps, IconButtonProps, InputProps, InputWrapperProps, LinkProps, RadioButtonProps,
    RadioGroupProps, SelectProps, SliderProps, SwitchProps, TextareaProps, TypographyProps,
};
// Data component Props
pub use crate::data::{
    CellProps, CollapseProps, ColumnProps, DragDropTreeProps, FilterProps, PaginationButtonProps,
    PaginationProps, RenderDragNodeProps, RowSelectionProps, SelectionProps, SortProps, TableProps,
    TreeNodeArrowProps, TreeNodeContentProps, TreeNodeLabelProps, TreeNodeProps, TreeProps,
    VirtualTreeProps,
};
// Display component Props
pub use crate::display::{
    CalendarProps, CarouselProps, CommentProps, DragLayerProps, EmptyProps, QRCodeProps,
    SkeletonCardProps, SkeletonProps, SkeletonTableProps, TagProps, TimelineItemProps,
    TimelineProps, UserGuideProps, ZoomControlsProps,
};
// Entry component Props
pub use crate::entry::{
    AutoCompleteProps, CascaderProps, NumberInputProps, SearchProps, TransferProps,
};
// Feedback component Props
pub use crate::feedback::{
    AlertProps, DrawerProps, GlowProps, PopoverProps, ProgressProps, SpinProps, ToastProps,
    TooltipProps,
};
// Layout component Props
pub use crate::layout::{
    ContainerProps, DividerProps as LayoutDividerProps, FlexBoxProps, FooterProps, SpaceProps,
};
// Navigation component Props
pub use crate::navigation::{
    BreadcrumbItemProps, BreadcrumbProps, MenuItemProps, MenuProps, SidebarItemProps,
    SidebarLeafProps, SidebarProps, SidebarSectionProps, StepsProps, SubMenuProps, TabPaneProps,
    TabsProps,
};
// Production component Props
pub use crate::production::{
    AudioPlayerProps, CodeHighlightProps, MarkdownEditorProps, RichTextEditorProps,
    VideoPlayerProps,
};
pub use crate::styled::{StyleRegistry, StyledComponent};
