import { CreateItemInputs } from "@/app/api/settings/item/actions";
import { fetchItem } from "@/app/api/settings/item";
import GeneralLoading from "@/components/General/GeneralLoading";
import DetailScheduleDetailView from "@/components/DetailScheduleDetail/DetailScheudleDetailView";

interface SubComponents {
  Loading: typeof GeneralLoading;
}

type EditDetailScheduleDetailProps = {
  id?: string | number;
};

type Props = EditDetailScheduleDetailProps;

const DetailScheduleDetailWrapper: React.FC<Props> & SubComponents = async ({
  id,
}) => {
  const defaultValues = {
    id: 1,
    productionDate: "2025-05-07",
    totalJobOrders: 13,
    totalProductionQty: 21000,
  };

  return (
    <DetailScheduleDetailView
      isEditMode={Boolean(id)}
      defaultValues={defaultValues}
      // qcChecks={qcChecks || []}
    />
  );
};

DetailScheduleDetailWrapper.Loading = GeneralLoading;

export default DetailScheduleDetailWrapper;
