// axi0 Motion 0.2.0: Arc gallery. Picture cards on the rim of a wide wheel that you drag, flick, scroll sideways or step with the arrow keys; the front one opens full size.
// Generated from src/arc-gallery/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 ArcGalleryProps extends HTMLAttributes<HTMLElement> {
  /** how strongly the row curves (0: a straight row) (default 3) */
  bend?: number;
  /** space between cards (default 34) */
  gap?: number;
  /** the name read out when the element has no aria-label (default "Gallery") */
  label?: string;
  /** The element to render (default "div") */
  as?: string;
  children?: ReactNode;
}

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

export function ArcGallery({ as = "div", bend, gap, label, ...rest }: ArcGalleryProps) {
  return createElement(as, { ...rest, "data-motion": "arc-gallery", "data-motion-bend": s(bend), "data-motion-gap": s(gap), "data-motion-label": s(label) });
}

export default ArcGallery;
