// axi0 Motion 0.2.0: Swell radio. A radio group of chips where the chosen one swells with a wobble and nudges its neighbors outward.
// Generated from src/swell-radio/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 SwellRadioProps extends HTMLAttributes<HTMLElement> {
  /** how far the neighbors move aside (default 6) */
  push?: number;
  /** The element to render (default "div") */
  as?: string;
  children?: ReactNode;
}

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

export function SwellRadio({ as = "div", push, ...rest }: SwellRadioProps) {
  return createElement(as, { ...rest, "data-motion": "swell-radio", "data-motion-push": s(push) });
}

export default SwellRadio;
