//! Advanced API for extending typedialog
//!
//! This module provides types and traits for advanced use cases like:
//! - Implementing custom backends
//! - Creating custom autocompletion strategies
//! - Building form parsers and renderers
//! - Template context manipulation
//!
//! # Examples
//!
//! ```no_run
//! use typedialog_core::advanced::{FormBackend, RenderContext, DisplayItem};
//! use typedialog_core::error::Result;
//! use typedialog_core::form_parser::FieldDefinition;
//! use serde_json::Value;
//!
//! struct MyCustomBackend;
//!
//! #[async_trait::async_trait]
//! impl FormBackend for MyCustomBackend {
//!     async fn initialize(&mut self) -> Result<()> {
//!         Ok(())
//!     }
//!
//!     async fn render_display_item(&self, _item: &DisplayItem, _ctx: &RenderContext) -> Result<()> {
//!         Ok(())
//!     }
//!
//!     async fn execute_field(&self, field: &FieldDefinition, _ctx: &RenderContext) -> Result<Value> {
//!         Ok(Value::String(format!("response for {}", field.name)))
//!     }
//!
//!     async fn shutdown(&mut self) -> Result<()> {
//!         Ok(())
//!     }
//!
//!     fn as_any(&self) -> &dyn std::any::Any { self }
//!
//!     fn is_available() -> bool { true }
//!
//!     fn name(&self) -> &str { "my-custom-backend" }
//! }
//! ```

pub use crate::error::{Error, ErrorWrapper, Result};

#[cfg(any(feature = "cli", feature = "tui", feature = "web"))]
pub use crate::autocompletion::{FilterCompleter, HistoryCompleter, PatternCompleter};

#[cfg(any(feature = "cli", feature = "tui", feature = "web"))]
pub use crate::backends::{FormBackend, RenderContext};

#[cfg(any(feature = "cli", feature = "tui", feature = "web"))]
pub use crate::form_parser::{parse_toml, DisplayItem};

#[cfg(feature = "templates")]
pub use crate::templates::TemplateContextBuilder;

pub use crate::helpers::EncryptionContext;

#[cfg(feature = "i18n")]
pub use crate::i18n::LocaleLoader;
