#pragma once
#include "imu_processor.h"
#include "lidar_processor.h"
#include "scancontext/Scancontext.h"
#include <memory>

enum BuilderStatus
{
    IMU_INIT,
    MAP_INIT,
    MAPPING
};

class MapBuilder
{
public:
    MapBuilder(Config &config, std::shared_ptr<IESKF> kf);

    void process(SyncPackage &package);
    BuilderStatus status() { return m_status; }
    std::shared_ptr<LidarProcessor> lidar_processor(){return m_lidar_processor;}

    void SaveMap(const std::string &map_foler_path);

private:
    Config m_config;
    BuilderStatus m_status;
    std::shared_ptr<IESKF> m_kf;
    std::shared_ptr<IMUProcessor> m_imu_processor;
    std::shared_ptr<LidarProcessor> m_lidar_processor;

    std::shared_ptr<SCManager> m_sc_manager;
};
