// axi0 Motion 0.2.0: Burst menu. A round menu button that bursts big pill links over its box, each popping in a beat after the last with its own tilt and hover color.
// Generated from src/burst-menu/meta.json by motion-pack: a thin wrapper. The loader (motion.js) must be on the page once;
// it starts the effect on the element this renders. Options left out keep the effect's own defaults.
import { createElement } from "react";
import type { HTMLAttributes, ReactNode } from "react";

export interface BurstMenuProps extends HTMLAttributes<HTMLElement> {
  /** hover colors, comma separated, one per link in turn (default "#f6a04d,#4ea1ff,#3ccf8e,#c084fc,#ff6b8b") */
  colors?: string;
  /** the menu button's name (default "Menu") */
  menu?: string;
  /** The element to render (default "div") */
  as?: string;
  children?: ReactNode;
}

const s = (v: unknown) => (v === undefined ? undefined : String(v));

export function BurstMenu({ as = "div", colors, menu, ...rest }: BurstMenuProps) {
  return createElement(as, { ...rest, "data-motion": "burst-menu", "data-motion-colors": s(colors), "data-motion-menu": s(menu) });
}

export default BurstMenu;
