import { createUniqueId } from "solid-js";
import { svgAttrs, maskInner, type CentralIconBaseProps } from "../CentralIconBase";

export const IconGamepad = (props: CentralIconBaseProps) => {
  const maskId = "round-outlined-radius-2-stroke-1-IconGamepad-" + createUniqueId();
  // Prevent reactive attributes from clearing innerHTML via a children update.
  // Keep innerHTML before children so SSR uses the SVG markup.
  return <svg {...svgAttrs({ ...props, ariaLabel: "gamepad, gaming, joystick" })} innerHTML={maskInner("<path d=\"M6 6H18C20.2091 6 22 7.79086 22 10V14C22 16.2091 20.2091 18 18 18H6C3.79086 18 2 16.2091 2 14V10C2 7.79086 3.79086 6 6 6Z\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke=\"currentColor\"/><path d=\"M8 9.75V12M8 12V14.25M8 12H10.25M8 12H5.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke=\"currentColor\"/><path d=\"M17.75 9.5C18.3023 9.5 18.75 9.94772 18.75 10.5C18.75 11.0523 18.3023 11.5 17.75 11.5C17.1977 11.5 16.75 11.0523 16.75 10.5C16.75 9.94772 17.1977 9.5 17.75 9.5Z\" stroke=\"currentColor\"/><path d=\"M14.75 12.5C15.3023 12.5 15.75 12.9477 15.75 13.5C15.75 14.0523 15.3023 14.5 14.75 14.5C14.1977 14.5 13.75 14.0523 13.75 13.5C13.75 12.9477 14.1977 12.5 14.75 12.5Z\" stroke=\"currentColor\"/>", maskId, props.mode)} children={null} />;
};

export default IconGamepad;
