#pragma once

#include <LibJS/Forward.h>
#include <LibJS/Runtime/Value.h>
#include <LibWeb/Bindings/WebGLRenderingContext.h>

namespace Web::Bindings {

struct WebGLContextAttributes {
    bool alpha { true };
    bool antialias { true };
    bool depth { true };
    bool desynchronized { false };
    bool fail_if_major_performance_caveat { false };
    WebGLPowerPreference power_preference { WebGLPowerPreference::Default };
    bool premultiplied_alpha { true };
    bool preserve_drawing_buffer { false };
    bool stencil { false };
    bool xr_compatible { false };
};

JS::ThrowCompletionOr<WebGLContextAttributes> convert_to_idl_value_for_web_gl_context_attributes(JS::VM&, JS::Value);

} // namespace Web::Bindings
