use std::collections::BTreeMap;
use tui::layout::Direction;
use crate::canvas::LayoutConstraint;
use crate::constants::DEFAULT_WIDGET_ID;
use crate::error::{BottomError, Result};
use crate::options::layout_options::{Row, RowChildren};
use crate::utils::error;
/// Represents a start and end coordinate in some dimension.
type LineSegment = (u32, u32);
type WidgetMappings = (u32, BTreeMap<LineSegment, u64>);
type ColumnRowMappings = (u32, BTreeMap<LineSegment, WidgetMappings>);
type ColumnMappings = (u32, BTreeMap<LineSegment, ColumnRowMappings>);
/// A "container" that contains more child elements, stored as [`NodeId`]s.
#[derive(Debug, Clone)]
pub(crate) struct Container {
/// The children elements.
children: Vec<NodeId>