import { ReactNode } from 'react';

type BooksLayoutProps = {
  children?: ReactNode;
  modal?: ReactNode;
};

const RootLayout: React.FC<BooksLayoutProps> = ({ children, modal }) => {
  return (
    <html lang="en">
      <body style={{ fontFamily: 'sans-serif', margin: 0 }}>
        <header style={{ padding: 20, background: '#eee' }}>
          <h2>My Book App</h2>
        </header>

        <main style={{ padding: 20, position: 'relative' }}>
          {children}
          {modal}
        </main>
      </body>
    </html>
  );
};

export default RootLayout;

