use std::collections::HashSet;
use bevy_ecs::prelude::*;
use derive_more::{AsMut, AsRef, Deref, DerefMut};
use crate::{
lang::{Lang, LangHelper},
lsp_types::Position,
prelude::*,
systems::TypeId,
};
#[derive(Component, Default, Debug, Clone, Eq, PartialEq)]
pub struct CurrentType(pub HashSet<TypeId>);
#[derive(Component, AsRef, Deref, AsMut, DerefMut, Debug)]
pub struct Element<L: Lang>(pub Spanned<L::Element>);
#[derive(Component, AsRef, Deref, AsMut, DerefMut, Debug)]
pub struct Wrapped<E>(pub E);
#[derive(Component, AsRef, Deref, AsMut, DerefMut, Debug)]
pub struct Errors<E>(pub Vec<E>);
#[derive(Component, AsRef, Deref, AsMut, DerefMut, Debug)]
pub struct Source(pub String);
#[derive(Component, AsRef, Deref, AsMut, DerefMut, Debug)]
pub struct RopeC(pub ropey::Rope);
#[derive(Component, Debug, AsRef, Deref)]
pub struct DynLang(pub Box<dyn LangHelper + 'static + Send + Sync>);
#[derive(Component, Debug)]
pub struct Open;
#[derive(Component, Debug)]
pub struct Dirty;
#[derive(Component, Debug)]
pub struct Global;
#[derive(Component, AsRef, Deref, AsMut, DerefMut, Debug)]
pub struct Label(pub crate::lsp_types::Url);
#[derive(Component, AsRef, Deref, AsMut, DerefMut, Debug, Clone)]
pub struct DocumentLinks(pub Vec<(crate::lsp_types::Url, &'static str)>);
#[derive(Component, AsRef, Deref, AsMut, DerefMut, Debug)]
pub struct PositionComponent(pub Position);
#[derive(Component, AsRef, Deref, AsMut, DerefMut, Debug)]
pub struct KeyWords(pub Vec<&'static str>);