use std::path::PathBuf;
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("COM initialization failed: {0}")]
ComInit(windows::core::Error),
#[error("Failed to parse path to shell item: {path}")]
ParsePath {
path: PathBuf,
#[source]
source: windows::core::Error,
},
#[error("Failed to bind to parent shell folder: {0}")]
BindToParent(windows::core::Error),
#[error("Selected paths do not share a common parent folder")]
NoCommonParent,
#[error("Failed to get context menu interface: {0}")]
GetContextMenu(windows::core::Error),
#[error("QueryContextMenu failed: {0}")]
QueryContextMenu(windows::core::Error),
#[error("TrackPopupMenu failed: {0}")]
TrackPopupMenu(windows::core::Error),
#[error("Failed to invoke command: {0}")]
InvokeCommand(windows::core::Error),
#[error("Failed to get command string: {0}")]
GetCommandString(windows::core::Error),
#[error("Failed to get menu item info: {0}")]
GetMenuItemInfo(windows::core::Error),
#[error("Failed to create hidden window: {0}")]
CreateWindow(windows::core::Error),
#[error("Failed to register window class: {0}")]
RegisterClass(windows::core::Error),
#[error("Windows API error: {0}")]
Windows(#[from] windows::core::Error),
}
pub type Result<T> = std::result::Result<T, Error>;