#pragma once

#include <AK/Noncopyable.h>
#include <AK/Optional.h>
#include <AK/StringView.h>

namespace HTTP {

struct HSTSPreloadEntry {
    StringView name;
    bool include_subdomains;
};

class HSTSPreloadData {
    AK_MAKE_NONCOPYABLE(HSTSPreloadData);
    AK_MAKE_NONMOVABLE(HSTSPreloadData);

public:
    static HSTSPreloadData const& the();

    Optional<HSTSPreloadEntry> find_exact(StringView lowercased_domain) const;
    bool is_known_preloaded_hsts_host(StringView domain) const;

private:
    HSTSPreloadData() = default;
};

}
