#pragma once

#include <cstdint>
#include <string>
#include <vector>

namespace obb::discover {

enum class MediaType : uint8_t {
  kArticle,
  kAudio,
  kImage,
  kMapTile,
};

struct ContentEntry {
  std::string title;
  std::string description;
  std::string path;      // relative path on microSD
  MediaType type = MediaType::kArticle;
  uint32_t bytes = 0;
  uint32_t checksum = 0; // CRC32 pour contrôle rapide
  bool kiosk_visible = true;
};

void library_init(const char *root_folder);
std::vector<ContentEntry> list_recent(std::size_t limit);
std::vector<ContentEntry> filter_by_type(MediaType type, std::size_t limit);

}  // namespace obb::discover