import React from "react";
import {DetailScheduleLoading} from "./DetailScheduleLoading";
import DSOverview from "./DetailScheduleSearchView";
import { ScheduleType } from "@/app/api/scheduling";
import { SearchProdSchedule } from "@/app/api/scheduling/actions";

interface SubComponents {
    Loading: typeof DetailScheduleLoading;
}

type Props = {
    type: ScheduleType
}

const DetailScheduleWrapper: React.FC<Props> & SubComponents = async ({
    type
}) => {

    const defaultInputs: SearchProdSchedule = {
        types: ["detailed", "manual"]
    }

    return <DSOverview type={type} defaultInputs={defaultInputs} />;
};

DetailScheduleWrapper.Loading = DetailScheduleLoading;

export default DetailScheduleWrapper;
