import { jsx as _jsx } from "react/jsx-runtime";
import { ModalContext, ModalIdContext } from "../../../../../../modal/modalContext";
import { AlgoOrderRootType } from "@orderly.network/types";
import { useContext, useEffect, useState } from "react";
export const TPSLSheetTitle = ()=>{
    const [title, setTitle] = useState("TP / SL");
    const mid = useContext(ModalIdContext);
    const ctx = useContext(ModalContext);
    const state = ctx[mid];
    useEffect(()=>{
        if (state.type === AlgoOrderRootType.POSITIONAL_TP_SL) {
            setTitle("Position TP/SL");
        } else {
            setTitle("TP / SL");
        }
    }, [
        state.type
    ]);
    return /*#__PURE__*/ _jsx("div", {
        children: title
    });
};

//# sourceMappingURL=tpslSheetTitle.js.map