import type { ReactNode } from "react";

import { Container } from "@/components/layout/container";
import { cn } from "@/lib/utils";

type AppShellProps = {
  sidebar: ReactNode;
  header: ReactNode;
  children: ReactNode;
  className?: string;
};

export function AppShell({ sidebar, header, children, className }: AppShellProps) {
  return (
    <div className="min-h-screen bg-background py-6 lg:py-8">
      <Container size="admin">
        <div className="flex gap-6">
          <aside className="hidden w-72 shrink-0 md:block">{sidebar}</aside>
          <div className={cn("flex min-w-0 flex-1 flex-col gap-6", className)}>
            {header}
            <main>{children}</main>
          </div>
        </div>
      </Container>
    </div>
  );
}
