#pragma once
#include "brush.h"
#include "serializer.h"
#include "binary_stream.h"

class ABR : public Serializer, public BinaryStreamReader
{
    bool section_desc();
    bool section_samp();
    bool section_patt();
public:
    std::vector<std::shared_ptr<Descriptor>> m_presets;
    std::map<std::string /*uid*/, std::shared_ptr<Image>> m_patterns;
    std::map<std::string /*uid*/, std::shared_ptr<Image>> m_samples;

    bool open(const std::string& path);
    std::vector<std::shared_ptr<Brush>> compute_brushes(const std::string& path);
};

