import AuthenticatedLayout from "@/Layouts/AuthenticatedLayout";
import { Head } from "@inertiajs/react";
import { IHoliday, PageProps } from "@/types";
import HolidaysFrom from "./Partials/HolidaysForm";
import PricesForm, {
    IPrice,
    IPriceCategory,
} from "@/Pages/Admin/ControlPanel/Partials/PricesForm";
import PriceCategoriesForm from "./Partials/PriceCategoriesForm";

export default function Index({
    auth,
    holidays,
    prices,
    priceCategories,
}: PageProps<{
    holidays: IHoliday[];
    prices: IPrice[];
    priceCategories: IPriceCategory[];
}>) {
    return (
        <AuthenticatedLayout user={auth.user} header={"Vezérlőpult kezelés"}>
            <Head title="Vezérlőpult kezelés" />
            <div className="p-4 sm:p-8 bg-babolygo-ocean shadow sm:rounded-lg m-2">
                <HolidaysFrom holidays={holidays} />
            </div>
            <div className="p-4 sm:p-8 bg-babolygo-ocean shadow sm:rounded-lg m-2">
                <PriceCategoriesForm priceCategories={priceCategories} />
            </div>
            <div className="p-4 sm:p-8 bg-babolygo-ocean shadow sm:rounded-lg m-2">
                <PricesForm prices={prices} priceCategories={priceCategories} />
            </div>
        </AuthenticatedLayout>
    );
}
