"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "SharePnLIcon", {
    enumerable: true,
    get: function() {
        return SharePnLIcon;
    }
});
const _jsxruntime = require("react/jsx-runtime");
const _icon = require("../../icon");
const _utils = require("../../utils");
const _modal = require("../../modal");
const _sharePosition = require("./sharePosition");
const _hooks = require("@orderly.network/hooks");
const SharePnLIcon = (props)=>{
    const leverage = (0, _hooks.useSymbolLeverage)(props.position.symbol);
    return /*#__PURE__*/ (0, _jsxruntime.jsx)(_icon.PositionShareIcon, {
        size: 12,
        className: (0, _utils.cn)("orderly-fill-white/20 hover:orderly-fill-white/80 hover:orderly-cursor-pointer orderly-inline-block", props.className),
        fill: "current",
        fillOpacity: 1,
        onClick: ()=>{
            _modal.modal.show(_sharePosition.SharePoisitionView, {
                position: props.position,
                leverage
            });
        }
    });
};

//# sourceMappingURL=sharePnLIcon.js.map