#pragma once
#include <memory>
#include <string>
#include "slides_ui.hpp"

std::shared_ptr<SlideDeck> parse_slides(const std::string& md_file);

struct Parser {
  int last = 0;
  bool error = false;
  std::shared_ptr<SlideDeck> deck;

  std::string title;
  std::string content;
  nlohmann::json config;

  Parser();
  bool parse(const std::string& input);
  void finalize();
  std::shared_ptr<SlideDeck> results() { return deck; }
};
