'use client';

import Image from 'next/image';

type Props = {
	type?: number;
};

export default function Loading({ type = 1 }: Props) {
	return (
		<>
		{ type === 1 && (
			<div className='absolute  inset-0 flex items-center justify-center bg-black bg-opacity-30 z-50'>
				<Image src='/resources/loading.gif' alt='준비 중...' width={64} height={64} priority />
			</div>
		)}

		{ type === 2 && (
			<div className='w-full flex items-center justify-center my-4'>
				<div className='w-7 h-7 border-[3px] border-gray-200 border-t-[#F7931A] rounded-full animate-spin' />
			</div>
		)}
		</>
	);
}