/*
 * Copyright (c) 2024, Matthew Olsson <mattco@serenityos.org>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#pragma once

#include <LibWeb/Animations/AnimationTimeline.h>

namespace Web::Internals {

class InternalAnimationTimeline : public Web::Animations::AnimationTimeline {
public:
    WEB_PLATFORM_OBJECT(InternalAnimationTimeline, Web::Animations::AnimationTimeline);
    GC_DECLARE_ALLOCATOR(InternalAnimationTimeline);

    virtual Optional<Animations::TimeValue> duration() const override { return {}; }

    virtual Optional<double> convert_a_timeline_time_to_an_origin_relative_time(Optional<Animations::TimeValue>) override { return {}; }

    virtual void update_current_time(double timestamp) override;

    void set_time(Optional<double> time);

private:
    explicit InternalAnimationTimeline(JS::Realm&, GC::Ref<DOM::Document>);
    virtual ~InternalAnimationTimeline() override = default;

    virtual void initialize(JS::Realm&) override;
};

}
