import { Main } from "./common.tsx";
import { Html, debug_render, render } from "./html.ts";
import { Component } from "./jsx/jsx-runtime.ts";
const peopleify = (...people: string[]): string[] =>
people.map(p => `${p} people`);
const animation_length = (num_items: number): number => num_items / 5;
const wheel_style = (num_items: number): string =>
`transform: translateY(calc(2rem * -${num_items})); animation: ${animation_length(
num_items
)}s ease-in-out reverse none running spin;`;
const get_delays = (...lengths: number[]): number[] => {
let out = [0];
for (const l of lengths) {
out.push((out.at(-1) ?? 0) + animation_length(l));
}
return out;
};
const Wheel: Component = ({ items }, _) => (
{...items.map((i: string) =>