class LoadingCircle extends Shadow {
    render() {
        div()
            .borderRadius(100, pct)
            .width(2, em).height(2, em)
            .x(45, pct).y(50, pct)
            .center()
            .backgroundColor("var(--accent")
            .transition("transform 1.75s ease-in-out")
            .onAppear(function () {
                let growing = true;

                setInterval(() => {
                    if (growing) {
                        this.style.transform = "scale(1.5)";
                    } else {
                        this.style.transform = "scale(0.7)";
                    }
                    growing = !growing;
                }, 750);
            });
    }
}

register(LoadingCircle)