// axi0 Motion 0.2.0: Frost icons. Icon tiles of frosted glass over a tilted color plate that swings up and lights the glass when you point at or focus them.
// Generated from src/frost-icons/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 FrostIconsProps extends HTMLAttributes<HTMLElement> {
  /** plate colors, comma separated, used in turn (an item's data-color wins) (default "#4f7cff,#a259ff,#ff4f7b,#6c63ff,#ff9f3d,#22c38e") */
  colors?: string;
  /** tile size (default 72) */
  size?: number;
  /** The element to render (default "div") */
  as?: string;
  children?: ReactNode;
}

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

export function FrostIcons({ as = "div", colors, size, ...rest }: FrostIconsProps) {
  return createElement(as, { ...rest, "data-motion": "frost-icons", "data-motion-colors": s(colors), "data-motion-size": s(size) });
}

export default FrostIcons;
