import StockInFormOld from "./StockInFormOld";
import EscalationLog from "./EscalationLog";
import EscalationComponent from "./EscalationComponent";
import React, { useState } from "react";
import { PurchaseQcResult } from "@/app/api/po/actions";
import { StockInLine } from "@/app/api/po";

interface Props {
    itemDetail: StockInLine & {
        qcResult?: PurchaseQcResult[] | undefined;
    };
    disabled: boolean
}

const EscalationTab:React.FC<Props> = ({itemDetail, disabled}) => {
    const [isCollapsed, setIsCollapsed] = useState(false);
    return <>
        <StockInFormOld itemDetail={itemDetail} disabled={disabled}/>
        <EscalationLog/>
        <EscalationComponent forSupervisor={false} isCollapsed={isCollapsed} setIsCollapsed={setIsCollapsed}/>
    </>
};

export default EscalationTab;