#pragma once

#include <LibJS/Runtime/NativeFunction.h>
#include <LibJS/Runtime/Object.h>
#include <LibWeb/Bindings/InterfaceObject.h>

namespace Web::Bindings {

struct TreeWalkerConstructor {
public:
    static void initialize(JS::Realm&, JS::NativeFunction&);
    static JS::ThrowCompletionOr<GC::Ref<JS::Object>> construct(InterfaceConstructor&, JS::FunctionObject&);

private:
};

struct TreeWalkerPrototype {
public:
    static void initialize(JS::Realm&, JS::Object&);
    static void define_unforgeable_attributes(JS::Realm&, JS::Object&);

private:
    JS_DECLARE_NATIVE_FUNCTION(root_getter);
    JS_DECLARE_NATIVE_FUNCTION(what_to_show_getter);
    JS_DECLARE_NATIVE_FUNCTION(filter_getter);
    JS_DECLARE_NATIVE_FUNCTION(current_node_getter);
    JS_DECLARE_NATIVE_FUNCTION(current_node_setter);
    JS_DECLARE_NATIVE_FUNCTION(parent_node);
    JS_DECLARE_NATIVE_FUNCTION(first_child);
    JS_DECLARE_NATIVE_FUNCTION(last_child);
    JS_DECLARE_NATIVE_FUNCTION(previous_sibling);
    JS_DECLARE_NATIVE_FUNCTION(next_sibling);
    JS_DECLARE_NATIVE_FUNCTION(previous_node);
    JS_DECLARE_NATIVE_FUNCTION(next_node);
};

} // namespace Web::Bindings
