//! 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};
//! use typedialog_core::error::Result;
//!
//! // Implement a custom backend
//! struct MyCustomBackend;
//!
//! #[async_trait::async_trait]
//! impl FormBackend for MyCustomBackend {
//!     async fn render_text(
//!         &mut self,
//!         prompt: &str,
//!         default: Option<&str>,
//!         placeholder: Option<&str>,
//!         _context: &RenderContext,
//!     ) -> Result<String> {
//!         // Custom implementation
//!         Ok(format!("{}: custom", prompt))
//!     }
//!
//!     // ... implement other required methods
//! #   async fn render_confirm(&mut self, _: &str, _: Option<bool>, _: &RenderContext) -> Result<bool> { Ok(true) }
//! #   async fn render_select(&mut self, _: &str, _: &[String], _: Option<usize>, _: Option<usize>, _: bool, _: &RenderContext) -> Result<String> { Ok("".into()) }
//! #   async fn render_multiselect(&mut self, _: &str, _: &[String], _: &[String], _: Option<usize>, _: bool, _: &RenderContext) -> Result<Vec<String>> { Ok(vec![]) }
//! #   async fn render_password(&mut self, _: &str, _: &RenderContext) -> Result<String> { Ok("".into()) }
//! #   async fn render_custom(&mut self, _: &str, _: &str, _: &RenderContext) -> Result<String> { Ok("".into()) }
//! #   async fn render_editor(&mut self, _: &str, _: Option<&str>, _: Option<&str>, _: &RenderContext) -> Result<String> { Ok("".into()) }
//! #   async fn render_date(&mut self, _: &str, _: Option<chrono::NaiveDate>, _: Option<chrono::NaiveDate>, _: Option<chrono::NaiveDate>, _: chrono::Weekday, _: &RenderContext) -> Result<chrono::NaiveDate> { Ok(chrono::NaiveDate::from_ymd_opt(2024, 1, 1).unwrap()) }
//! }
//! ```

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;
