#![cfg(not(doctest))]
#![doc = include_str!("../README.MD")]
#![warn(missing_docs)]

use lazy_static::lazy_static;
use proc_macro::TokenStream;

mod app;
mod main_;

lazy_static! {
    static ref MANAGER: brisk_it::generator::Manager = brisk_it::generator::ManagerBuilder::new()
        .insert(&brisk_egui_components::MANAGER)
        .create::<app::App>("App")
        .create::<main_::Main>("Main")
        .into();
}

/// This macro is used to transform a brisk declarative representation
/// into an `eframe` app. Look at examples for usage.
#[proc_macro]
pub fn brisk_it(input: TokenStream) -> TokenStream {
    brisk_it::brisk_it(input, &MANAGER)
}
