import styles from 'styles/LoadingScreen.module.sass'
import { useTheme } from 'next-themes'
import Image from 'next/image'

const LoadingScreen = ({
    isLoading,
    className,
}: {
    isLoading: boolean
    className?: string
}) => {
    const { resolvedTheme: theme } = useTheme()

    if (isLoading)
        return (
            <div data-theme={theme} className={styles.cover}>
                <div className={styles.center}>
                    <svg className={styles.svg} viewBox="0 0 200 200">
                        <use href={`/ValorantSymbol.svg#${theme}`} />
                    </svg>
                </div>
            </div>
        )
}

export default LoadingScreen
