mod bootstrap;
mod tailwind;
use crate::ColumnSort;
pub use bootstrap::*;
pub use tailwind::*;
pub trait TableClassesProvider {
fn new() -> Self;
fn thead(&self, prop_class: &str) -> String {
prop_class.to_string()
}
fn thead_row(&self, prop_class: &str) -> String {
prop_class.to_string()
}
fn thead_cell(&self, sort: ColumnSort, macro_class: &str) -> String {
format!("{} {}", sort.as_class(), macro_class)
}
fn thead_cell_inner(&self) -> String {
"".to_string()
}
fn tbody(&self, prop_class: &str) -> String {
prop_class.to_string()
}
#[allow(unused_variables)]
fn row(&self, row_index: usize, selected: bool, prop_class: &str) -> String {
prop_class.to_string() + if selected { " selected" } else { "" }
}
#[allow(unused_variables)]
fn loading_cell(&self, row_index: usize, col_index: usize, prop_class: &str) -> String {
prop_class.to_string()
}
#[allow(unused_variables)]
fn loading_cell_inner(&self, row_index: usize, col_index: usize, prop_class: &str) -> String {
prop_class.to_string()
}
fn cell(&self, macro_class: &str) -> String {
macro_class.to_string()
}
}
#[derive(Copy, Clone)]
pub struct DummyTableClassesProvider;
impl TableClassesProvider for DummyTableClassesProvider {
fn new() -> Self {
Self
}
}