"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "TPSLSheetTitle", {
    enumerable: true,
    get: function() {
        return TPSLSheetTitle;
    }
});
const _jsxruntime = require("react/jsx-runtime");
const _modalContext = require("../../../../../../modal/modalContext");
const _types = require("@orderly.network/types");
const _react = require("react");
const TPSLSheetTitle = ()=>{
    const [title, setTitle] = (0, _react.useState)("TP / SL");
    const mid = (0, _react.useContext)(_modalContext.ModalIdContext);
    const ctx = (0, _react.useContext)(_modalContext.ModalContext);
    const state = ctx[mid];
    (0, _react.useEffect)(()=>{
        if (state.type === _types.AlgoOrderRootType.POSITIONAL_TP_SL) {
            setTitle("Position TP/SL");
        } else {
            setTitle("TP / SL");
        }
    }, [
        state.type
    ]);
    return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
        children: title
    });
};

//# sourceMappingURL=tpslSheetTitle.js.map