{
    "Function": "previewWithdraw",
    "File": "src/InvestmentManager.sol",
    "Parent Contracts": [
        "src/util/Auth.sol"
    ],
    "High-Level Calls": [],
    "Internal Calls": [
        "calculateRedeemPrice",
        "_calculateTrancheTokenAmount",
        "_toUint128"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function previewWithdraw(address user, address liquidityPool, uint256 _currencyAmount)\n        public\n        view\n        returns (uint256 trancheTokenAmount)\n    {\n        uint128 currencyAmount = _toUint128(_currencyAmount);\n        uint256 redeemPrice = calculateRedeemPrice(user, liquidityPool);\n        if (redeemPrice == 0) return 0;\n\n        trancheTokenAmount = uint256(_calculateTrancheTokenAmount(currencyAmount, liquidityPool, redeemPrice));\n    }"
}