/** biome-ignore-all lint/complexity/noBannedTypes: {} is the "empty props" type in React */
import type * as Godot from "godot"
import type * as React from "react"
import * as Renderer from "./Renderer.js"


export const make = <C extends new (...args: any[]) => Godot.Node<Godot.NodePathMap>>(
    parent: C,
    component: React.FC<{}>,
): C => class extends parent {
    _ready(): void {
        // @ts-expect-error
        if (super._ready) super._ready()
        Renderer.renderComponent(this, component)
    }
}
