// axi0 Motion 0.2.0: Mute switch. A button that mutes and unmutes every sound on the page, in memory only, so a reload starts fresh.
// Generated from src/mute-switch/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 MuteSwitchProps extends HTMLAttributes<HTMLElement> {
  /** The element to render (default "button") */
  as?: string;
  children?: ReactNode;
}

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

export function MuteSwitch({ as = "button", ...rest }: MuteSwitchProps) {
  return createElement(as, { ...rest, "data-sound": "mute-switch" });
}

export default MuteSwitch;
