#pragma once

#include <balancer/kernel/cookie/gdpr/gdpr.cfgproto.pb.h>

#include <library/cpp/regex/pire/pire.h>
#include <library/cpp/regex/pire/regexp.h>

#include <util/generic/vector.h>

namespace NGdprCookie {

    class TCookieRegistry {
    public:
        explicit TCookieRegistry(TCookies cfg, bool detectConflicts);

        const TCookie& Get(TStringBuf name) const noexcept;

    private:
        NRegExp::TFsm Names_ = NRegExp::TFsm::False();
        TVector<TCookie> Cookies_ = TVector<TCookie>(1);
    };

}
