pub use product::Product;
pub use product::category::Category;
//# This crate provides a simple representation of products and their categories.

/// This is a comment
mod product {
    use category::Category;
    /// Struct representing a product with an ID, name, price, and category.
    #[derive(PartialEq, Debug)]
    pub struct Product {
        id: u64,
        pub name: String,
        price: f64,
        category: Category,
    }

    impl Product {
        /// # Example
        /// ```
        /// use my_package::{Product, Category};
        /// let product = Product::new(1, String::from("Laptop"), 999.99, Category::Electronics);
        /// assert_eq!(product.name, String::from("Laptop"));
        /// ```
        pub fn new(id: u64, name: String, price: f64, category: Category) -> Self {
            Product {
                id,
                name,
                price,
                category,
            }
        }
    }

    pub mod category {
        /// Enum representing different product categories.
        #[derive(PartialEq, Debug)]
        pub enum Category {
            Electronics,
            Clothing,
            Home,
        }
    }
}