#pragma once

#include <string>
#include <flecs.h>

/**
 * @brief Base component for procedural primitives that feed into TriangleBuffer
 */
struct PrimitiveComponent {
    // Type of primitive
    enum class Type {
        None,
        Box,
        Plane
    };
    
    Type type = Type::None;
    
    // Box parameters
    float boxSizeX = 1.0f;
    float boxSizeY = 1.0f;
    float boxSizeZ = 1.0f;
    
    // Plane parameters
    float planeSizeX = 1.0f;
    float planeSizeY = 1.0f;
    int planeSegmentsX = 1;
    int planeSegmentsY = 1;
    
    // Dirty flag - triggers TriangleBuffer rebuild
    bool dirty = true;
    
    // Track last seen transform version to detect gizmo movements
    unsigned int lastTransformVersion = 0;
    
    void markDirty() { dirty = true; }
};
