import type { ComponentPropsWithRef } from "react"

/**
 * Renders an accessible Facebook SVG icon.
 *
 * The component forwards received props onto the root `<svg>` element to allow external customization (for example `className`, `style`, `ref`, and event handlers). The SVG includes an `aria-label` of "Facebook".
 *
 * @param props - Props to spread onto the root SVG element (e.g., `className`, `style`, `ref`, event handlers)
 * @returns The SVG element representing the Facebook logo
 */
export function Facebook(props: ComponentPropsWithRef<"svg">) {
  return (
    <svg
      xmlns="http://www.w3.org/2000/svg"
      viewBox="0 0 256 256"
      role="img"
      aria-label="Facebook"
      {...props}
    >
      <path
        fill="#1877f2"
        d="M256 128C256 57.308 198.692 0 128 0S0 57.308 0 128c0 63.888 46.808 116.843 108 126.445V165H75.5v-37H108V99.8c0-32.08 19.11-49.8 48.348-49.8C170.352 50 185 52.5 185 52.5V84h-16.14C152.959 84 148 93.867 148 103.99V128h35.5l-5.675 37H148v89.445c61.192-9.602 108-62.556 108-126.445"
      />
      <path
        fill="#fff"
        d="m177.825 165l5.675-37H148v-24.01C148 93.866 152.959 84 168.86 84H185V52.5S170.352 50 156.347 50C127.11 50 108 67.72 108 99.8V128H75.5v37H108v89.445A129 129 0 0 0 128 256a129 129 0 0 0 20-1.555V165z"
      />
    </svg>
  )
}
