// axi0 Motion 0.2.0: Blob nav. A nav bar whose active pill breaks into drops of goo that flow over to the link you pick.
// Generated from src/blob-nav/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 BlobNavProps extends HTMLAttributes<HTMLElement> {
  /** how many drops burst from the link you pick (default 12) */
  particles?: number;
  /** how far the drops fly (default 70) */
  spread?: number;
  /** how long the burst lasts (default 700) */
  duration?: number;
  /** The element to render (default "div") */
  as?: string;
  children?: ReactNode;
}

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

export function BlobNav({ as = "div", particles, spread, duration, ...rest }: BlobNavProps) {
  return createElement(as, { ...rest, "data-motion": "blob-nav", "data-motion-particles": s(particles), "data-motion-spread": s(spread), "data-motion-duration": s(duration) });
}

export default BlobNav;
