/**
 * Copyright (c) 2025 xwra
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */

import { ComponentChildren } from "preact";

interface LayoutProps {
	children: ComponentChildren;
	[key: string]: any;
}

export function Section({ children, class: className, ...props }: LayoutProps) {
	return (
		<div
			{...props}
			class={`section ${className || ""}`}
		>
			{children}
		</div>
	);
}

export function Centered(
	{ children, class: className, ...props }: LayoutProps,
) {
	return (
		<main class={`centered ${className || ""}`} {...props}>
			{children}
		</main>
	);
}
