use std::env::consts::FAMILY;
use crate::enums::SystemFamily;
use crate::strategy::traits::HwStrategy;

pub mod strategy;
pub mod enums;
pub mod dtos;

/// Returns the system family based on the operating system.
///
/// # Purpose
///
/// This function determines the system family (Windows, MacOSX, Linux) based on the operating system family constant.
///
/// # Parameters
///
/// None. The function does not take any parameters.
///
/// # Return Value
///
/// - `Ok(SystemFamily::Windows)`: If the operating system family is "windows".
/// - `Ok(SystemFamily::Macosx)`: If the operating system family is "macosx".
/// - `Ok(SystemFamily::Linux)`: If the operating system family is "unix".
/// - `Err("Unknown operating system family")`: If the operating system family is not recognized.
pub fn get_system_family<'a>() -> Result<SystemFamily, &'a str> {
	match FAMILY {
		"windows" => Ok(SystemFamily::Windows),

		"macosx" => Ok(SystemFamily::Macosx),

		"unix" => Ok(SystemFamily::Linux),

		_ => Err("Unknown operating system family")
	}
}
