#pragma once

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

namespace Web::Bindings {

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

private:
};

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

private:
    JS_DECLARE_NATIVE_FUNCTION(disconnect);
};

struct FakeXRDeviceInit {
    Optional<Vector<String>> supported_features {};
    Optional<Vector<XRSessionMode>> supported_modes {};
};

JS::ThrowCompletionOr<FakeXRDeviceInit> convert_to_idl_value_for_fake_xr_device_init(JS::VM&, JS::Value);

} // namespace Web::Bindings
