use thiserror::Error;
pub type Result<T> = std::result::Result<T, TableError>;
#[derive(Debug, Error)]
pub enum TableError {
#[error("PDF operation failed: {0}")]
PdfError(#[from] lopdf::Error),
#[error("Invalid table structure: {0}")]
InvalidTable(String),
#[error("Layout calculation failed: {0}")]
LayoutError(String),
#[error("Invalid style configuration: {0}")]
StyleError(String),
#[error("Text rendering failed: {0}")]
TextError(String),
#[error("Invalid dimensions: {0}")]
DimensionError(String),
#[error("Page with ID {0:?} not found")]
PageNotFound(lopdf::ObjectId),
#[error("Drawing operation failed: {0}")]
DrawingError(String),
}