import { JSX } from "preact";

interface PageContainerProps {
  children: JSX.Element | JSX.Element[] | string;
  centered?: boolean;
  className?: string;
}

export default function PageContainer({ children, centered = false, className = "" }: PageContainerProps) {
  const baseClasses = "w-screen min-w-[375px] h-screen p-3 flex flex-col box-border overflow-hidden";
  const centeredClasses = centered ? "items-center justify-center" : "";
  
  return (
    <div className={`${baseClasses} ${centeredClasses} ${className}`}>
      {children}
    </div>
  );
}