use crate::element::{ElementProps, ElementWidget};
use bevy::asset::AssetServer;
use bevy::prelude::{Entity, EntityCommands};
use roxmltree::Node;
pub mod checkbox;
pub mod node;
pub mod button;
pub mod text;
pub mod image;
pub mod text_input;
pub mod slider;
pub mod progress_bar;
pub mod tooltip;
pub mod divider;
pub mod scroll_view;
pub mod dropdown;
pub trait Widget {
fn spawn(&self, commands: &mut EntityCommands, assets: &AssetServer) -> Entity;
fn parse(
node: &Node,
prefix: Option<&str>,
base: Option<&ElementWidget>,
) -> Result<Self, String>
where
Self: Sized;
fn apply_defaults(
node: &Node,
default: &mut ElementProps,
hover: &mut ElementProps,
click: &mut ElementProps,
);
}