#pragma once

#include "imgui.h"

// Renders a mini inline line chart for use in tables, headers and KPI cards.
// Uses PushID/PopID with id for uniqueness inside tables.
//
// Auto Y-scale variants:
void sparkline(const char* id, const float* values, int count,
               float width = 100.0f, float height = 20.0f);

void sparkline(const char* id, const float* values, int count, ImVec4 color,
               float width = 100.0f, float height = 20.0f);

// Fixed Y-scale variants — clamp the polyline to [y_min, y_max] so cards in a
// grid stay visually comparable (ej. CPU% / RAM%: pasar 0,100). v1.1.
// width y height son explicitos (sin default) para que el compilador no haga
// match contra los overloads sin y_min/y_max.
void sparkline(const char* id, const float* values, int count,
               float y_min, float y_max,
               float width, float height);

void sparkline(const char* id, const float* values, int count, ImVec4 color,
               float y_min, float y_max,
               float width, float height);
