#pragma once

#include <AK/String.h>
#include <LibJS/Forward.h>
#include <LibJS/Runtime/NativeFunction.h>
#include <LibJS/Runtime/Object.h>
#include <LibJS/Runtime/Value.h>
#include <LibWeb/Bindings/Event.h>
#include <LibWeb/Bindings/InterfaceObject.h>

namespace Web::Bindings {

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

private:
};

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

private:
    JS_DECLARE_NATIVE_FUNCTION(status_message_getter);
};

struct WebGLContextEventInit : public EventInit {
    String status_message { String {} };
};

JS::ThrowCompletionOr<WebGLContextEventInit> convert_to_idl_value_for_web_gl_context_event_init(JS::VM&, JS::Value);

} // namespace Web::Bindings
