import React from 'react'
import {cn} from "@/shared/lib/utils";

interface LoaderProps {
  height?: string
}

const Loader = ({height}: LoaderProps) => {
  return (
      <div className={cn(
          "w-full h-full flex justify-center items-center",
          height ?? "h-[calc(100vh-80px)]"
      )}>
        <svg
            className="animate-spin -ml-1 mr-3 h-5 w-5 text-primary"
            xmlns="http://www.w3.org/2000/svg"
            viewBox="0 0 24 24"
            fill="none"
            stroke="currentColor"
        >
          <circle
              className="opacity-25"
              cx="12"
              cy="12"
              r="10"
              strokeWidth="4"
          />
          <path
              className="opacity-75"
              fill="currentColor"
              d="M4 12a8 8 0 1 1 16 0A8 8 0 0 1 4 12z"
          />
        </svg>
      </div>
  )
}
export default Loader
