#pragma once

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

namespace Web::Bindings {

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

private:
};

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

private:
    JS_DECLARE_NATIVE_FUNCTION(width_getter);
    JS_DECLARE_NATIVE_FUNCTION(actual_bounding_box_left_getter);
    JS_DECLARE_NATIVE_FUNCTION(actual_bounding_box_right_getter);
    JS_DECLARE_NATIVE_FUNCTION(font_bounding_box_ascent_getter);
    JS_DECLARE_NATIVE_FUNCTION(font_bounding_box_descent_getter);
    JS_DECLARE_NATIVE_FUNCTION(actual_bounding_box_ascent_getter);
    JS_DECLARE_NATIVE_FUNCTION(actual_bounding_box_descent_getter);
    JS_DECLARE_NATIVE_FUNCTION(em_height_ascent_getter);
    JS_DECLARE_NATIVE_FUNCTION(em_height_descent_getter);
    JS_DECLARE_NATIVE_FUNCTION(hanging_baseline_getter);
    JS_DECLARE_NATIVE_FUNCTION(alphabetic_baseline_getter);
    JS_DECLARE_NATIVE_FUNCTION(ideographic_baseline_getter);
};

} // namespace Web::Bindings
