import type { PropsWithChildren } from 'react';

import { Sidebar } from './Sidebar';

type AppShellProps = PropsWithChildren<{
  active: string;
  onSelect: (value: string) => void;
  onLogout: () => void;
}>;

export function AppShell({
  active,
  onSelect,
  onLogout,
  children,
}: AppShellProps) {
  return (
    <div className="flex h-screen overflow-hidden bg-ink-950 text-white">
      <Sidebar
        active={active}
        onSelect={onSelect}
        onLogout={onLogout}
      />

      <main className="flex-1 overflow-hidden p-4">
        {children}
      </main>
    </div>
  );
}