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="min-w-0 flex-1 overflow-auto p-4">
        {children}
      </main>
    </div>
  );
}