'use client';

import { Container, Flex } from '@chakra-ui/react';
import Header from '@/components/layout/header/header';
import Footer from '@/components/layout/footer/footer';
import BackToTop from '@/components/ui/back-to-top';

function MainLayout({ children }: { children: React.ReactNode }) {
  return (
    <Flex minH='100vh' direction='column'>
      <Header />
      <Container as='main' maxW='8xl' flex='1' py={4}>
        {children}
      </Container>
      <BackToTop />
      <Footer />
    </Flex>
  );
}

export default MainLayout;
