use serde::{Deserialize, Serialize};
use super::bbox::BoundingBox;
use super::content::ContentElement;
use super::enums::SemanticType;
use super::table::TableTokenRow;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct PDFList {
pub bbox: BoundingBox,
pub index: Option<u32>,
pub level: Option<String>,
pub list_items: Vec<ListItem>,
pub numbering_style: Option<String>,
pub common_prefix: Option<String>,
pub previous_list_id: Option<u64>,
pub next_list_id: Option<u64>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ListItem {
pub bbox: BoundingBox,
pub index: Option<u32>,
pub level: Option<String>,
pub label: ListLabel,
pub body: ListBody,
pub label_length: usize,
pub contents: Vec<ContentElement>,
pub semantic_type: Option<SemanticType>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ListLabel {
pub bbox: BoundingBox,
pub content: Vec<TableTokenRow>,
pub semantic_type: Option<SemanticType>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ListBody {
pub bbox: BoundingBox,
pub content: Vec<TableTokenRow>,
pub semantic_type: Option<SemanticType>,
}
#[derive(Debug, Clone)]
pub struct ListInterval {
pub list_indexes: Vec<usize>,
pub list_item_infos: Vec<ListItemInfo>,
pub numbering_style: Option<String>,
pub number_of_columns: Option<usize>,
}
#[derive(Debug, Clone)]
pub struct ListItemInfo {
pub label_text: String,
pub sequence_value: i64,
}