import * as React from "react"

import { cn } from "@/lib/utils"

function Spinner({ className, ...props }: React.ComponentProps<"svg">) {
  return (
    <svg
      aria-hidden="true"
      data-slot="spinner"
      viewBox="0 0 24 24"
      className={cn("size-[var(--bh-spinner-size)] animate-spin text-current", className)}
      {...props}
    >
      <circle
        cx="12"
        cy="12"
        r="10"
        fill="none"
        stroke="currentColor"
        strokeWidth="4"
        opacity="var(--bh-opacity-25)"
      />
      <path
        fill="currentColor"
        d="M22 12a10 10 0 0 1-10 10v-4a6 6 0 0 0 6-6z"
      />
    </svg>
  )
}

export { Spinner }
