#pragma once

#include <yweb/antispam/url_ndp/format.h>
#include <yweb/antispam/url_ndp/owner.h>

namespace NWebmaster {

struct TAnsipamOwnerCanonizer {
    TAnsipamOwnerCanonizer();

    bool GetOwner(const TString &url, TString &owner, TString &error, bool hostOnly = true);

public:
    THolder<TOwnerExtractor> Extractor;
    THolder<TOwnerForms> OwnerForms;
    TUrlDescendingParser Parser;
};

namespace NUtils {

TStringBuf GetMetrikaOwner(const TStringBuf &hostname);

} //namespace NUtils
} //namespace NWebmaster
