import dynamic from 'next/dynamic'
import BasicFooter from '../elements/Footer/BasicFooter'
import Image from 'next/image'

const Navbar = dynamic(() => import('../elements/Navbar/Navbar'))
const AnimationLayout = dynamic(() => import('./AnimationLayout'))

const BasicLayout = ({ children }) => {
  return (
    <>
      <Navbar />
      <AnimationLayout>
        {children}
        <div className='fixed bottom-4 right-4 sm:bottom-8 sm:right-8 z-50'>
          <a href='https://wa.me/628128080622'>
            <Image
              src='/images/socials/Whatsapp-2.png'
              alt='Whatsapp'
              className='block sm:hidden'
              width={48}
              height={48}
            />
            <Image
              src='/images/socials/Whatsapp-2.png'
              alt='Whatsapp'
              className='hidden sm:block'
              width={60}
              height={60}
            />
          </a>
        </div>
      </AnimationLayout>
      <BasicFooter />
    </>
  )
}

export default BasicLayout
