/**
 * @file types.hpp
 * @brief Core type definitions and aliases for the project.
 *
 * This file provides a centralized location for type definitions used throughout
 * the project. It includes fixed-width integer types, floating-point types, and
 * commonly used GLM vector types. The type aliases are designed to improve code
 * readability and ensure consistent type usage across the codebase.
 */

#pragma once

#include <cstddef>
#include <cstdint>
#include <glm/glm.hpp>
#include <string>

#define fn auto

// Integer Types

/**
 * @brief 8-bit unsigned integer.
 * @details Range: 0 to 255
 * Used for byte-level operations and color channel values.
 */
using u8 = std::uint8_t;

/**
 * @brief 16-bit unsigned integer.
 * @details Range: 0 to 65,535
 * Used for texture coordinates and small indices.
 */
using u16 = std::uint16_t;

/**
 * @brief 32-bit unsigned integer.
 * @details Range: 0 to 4,294,967,295
 * Used for array sizes, indices, and flags.
 */
using u32 = std::uint32_t;

/**
 * @brief 64-bit unsigned integer.
 * @details Range: 0 to 18,446,744,073,709,551,615
 * Used for large indices and timestamps.
 */
using u64 = std::uint64_t;

/**
 * @brief 8-bit signed integer.
 * @details Range: -128 to 127
 * Used for small signed values and relative offsets.
 */
using i8 = std::int8_t;

/**
 * @brief 16-bit signed integer.
 * @details Range: -32,768 to 32,767
 * Used for medium-range signed values.
 */
using i16 = std::int16_t;

/**
 * @brief 32-bit signed integer.
 * @details Range: -2,147,483,648 to 2,147,483,647
 * Primary signed integer type for general use.
 */
using i32 = std::int32_t;

/**
 * @brief 64-bit signed integer.
 * @details Range: -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
 * Used for large signed values and time calculations.
 */
using i64 = std::int64_t;

// Floating-Point Types

/**
 * @brief 32-bit floating-point number.
 * @details IEEE 754 single-precision
 * Used for graphics calculations, positions, and colors.
 */
using f32 = float;

/**
 * @brief 64-bit floating-point number.
 * @details IEEE 754 double-precision
 * Used for high-precision calculations and physics.
 */
using f64 = double;

// Size Types

/**
 * @brief Unsigned size type.
 * @details Platform-dependent size (32/64-bit)
 * Used for memory sizes and container sizes.
 */
using usize = std::size_t;

/**
 * @brief Signed size type.
 * @details Platform-dependent size (32/64-bit)
 * Used for pointer arithmetic and container differences.
 */
using isize = std::ptrdiff_t;

/**
 * @brief String type alias.
 * @details Standard string type for text handling.
 */
using string = std::string;

// GLM Vector Types

/**
 * @brief 2D vector with 32-bit float components.
 * @details Used for 2D positions, texture coordinates.
 */
using vec2 = glm::f32vec2;

/**
 * @brief 3D vector with 32-bit float components.
 * @details Used for 3D positions, colors, normals.
 */
using vec3 = glm::f32vec3;

/**
 * @brief 4D vector with 32-bit float components.
 * @details Used for homogeneous coordinates, quaternions.
 */
using vec4 = glm::f32vec4;

/**
 * @brief 2D vector with 64-bit float components.
 * @details Used for high-precision 2D calculations.
 */
using dvec2 = glm::f64vec2;

/**
 * @brief 3D vector with 64-bit float components.
 * @details Used for high-precision 3D positions and directions.
 */
using dvec3 = glm::f64vec3;

/**
 * @brief 4D vector with 64-bit float components.
 * @details Used for high-precision homogeneous coordinates.
 */
using dvec4 = glm::f64vec4;
