//! # RUSTELO Components
//!
//! <div align="center">
//!  <img src="../logos/rustelo_dev-logo-h.svg" alt="RUSTELO" width="300" />
//! </div>
//!
//! Reusable UI components for the RUSTELO web application framework.

#![recursion_limit = "512"]
#![allow(non_snake_case)]
// Allow Leptos macro patterns that trigger clippy warnings
#![allow(clippy::unit_arg)] // view! { <></> }.into_any() is idiomatic Leptos
#![allow(clippy::too_many_arguments)] // Component render functions often have many props
#![allow(clippy::unnecessary_literal_unwrap)] // Leptos pattern for Option handling
#![allow(clippy::needless_borrow)] // Leptos macros sometimes need explicit borrows
#![allow(clippy::manual_div_ceil)] // Used in pagination logic
#![allow(clippy::iter_nth_zero)] // Sometimes clearer than .next() in iteration
#![allow(clippy::useless_format)] // Format strings for consistency
#![allow(clippy::unnecessary_cast)] // Casts for clarity in numeric operations
#![allow(clippy::manual_unwrap_or_default)] // Match patterns can be clearer
#![allow(clippy::redundant_closure)] // Closures in Leptos patterns

// Fix Leptos macro conflicts by shadowing our 'core' crate with std::core

pub mod activities;
pub use activities::{ActivitiesCTAView, ActivityAccessStatus};
pub mod admin;
pub mod auth;
pub mod bookmarks;
pub mod contact;
pub mod content;
pub mod cookie;
pub mod filter;
pub mod logo;
pub mod navigation;
pub mod theme;
pub mod toast;
pub mod ui;

// Re-enable filter exports (partially - components with macro errors disabled)
// Re-export admin components
pub use admin::admin_layout::{
    AdminBreadcrumb, AdminCard, AdminEmptyState, AdminHeader, AdminLayout, AdminSection,
};
pub use auth::server_fns::{
    server_get_bookmarks, server_get_session_user, server_is_bookmarked, server_logout_all,
    server_refresh_token, server_remove_bookmark, BookmarkInfo,
};
// Re-export auth components
pub use auth::{server_request_otp, server_verify_otp, LoginModal};
#[cfg(feature = "ssr")]
pub use auth::{OtpServiceExtension, OtpServiceFacade, OtpVerifyResult};
// Re-export bookmark components
pub use bookmarks::BookmarkButton;
#[cfg(feature = "ssr")]
pub use contact::facade::server::{ContactFormExtension, ContactFormFacade};
pub use contact::server_send_contact_form;
// pub use ui::mobile_menu::{MobileMenu, MobileMenuToggle};
// pub use ui::page_transition::{PageTransition, SimplePageTransition, TransitionStyle};

// Re-export content components
pub use content::{ContentManager, HtmlContent, SimpleContentGrid, UnifiedContentCard};
// Re-export cookie components
pub use cookie::{CookieBanner, CookieManageModal};
pub use filter::{
    clear_filter_cache,
    get_active_button_classes,
    get_inactive_button_classes,
    load_filter_items_from_json,
    FilterItem,
    // Re-enabled after fixing spawn_local compilation errors
    UnifiedCategoryFilter,
};
pub use navigation::command_palette::CommandPaletteExtraItems;
pub use navigation::command_palette::CommandPaletteOpen;
// Re-export navigation components (commented out until fixed)
// pub use navigation::{BrandHeader, Footer, LanguageSelector, NavMenu};

// Re-export logo components (commented out until fixed)
// pub use logo::{Logo, LogoLink, UnifiedProjectLogo};

// Re-export theme components (commented out until fixed)
// pub use theme::{DarkModeToggle, EffectiveTheme, ThemeMode, ThemeProvider, ThemeUtils};

// Re-export navigation overlays
pub use navigation::CommandPalette;
pub use navigation::FloatingPill;
// Re-export client-specific theme types when available
#[cfg(target_arch = "wasm32")]
pub use theme::{use_theme, ThemeContext};
pub use toast::{
    provide_toast_context, push_toast, push_toast_to, ToastContainer, ToastKind, ToastNotification,
};
// Re-export UI components
pub use ui::image_modal::ImageModal;
pub use ui::spa_link::SpaLink;
