"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "MemoizedCompnent", {
    enumerable: true,
    get: function() {
        return MemoizedCompnent;
    }
});
const _jsxruntime = require("react/jsx-runtime");
const _react = require("react");
const _statistic = require("../../../../../statistic");
const _hooks = require("@orderly.network/hooks");
const _text = require("../../../../../text");
const FundingRate = (props)=>{
    const data = (0, _hooks.useFundingRate)(props.symbol);
    return /*#__PURE__*/ (0, _jsxruntime.jsx)(_statistic.Statistic, {
        label: "Pred. funding rate",
        value: /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", {
            className: "orderly-flex flex-nowrap",
            children: [
                /*#__PURE__*/ (0, _jsxruntime.jsx)(_text.Numeral, {
                    className: "orderly-text-warning",
                    unit: "%",
                    precision: 4,
                    padding: true,
                    children: data.est_funding_rate
                }),
                /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
                    className: "orderly-ml-1 orderly-break-normal orderly-whitespace-nowrap",
                    children: `in ${data.countDown}`
                })
            ]
        }),
        hint: "Funding rates are payments between traders who are long and short. When positive, long positions pay short positions funding. When negative, short positions pay long positions."
    });
};
const MemoizedCompnent = /*#__PURE__*/ (0, _react.memo)(FundingRate);

//# sourceMappingURL=fundingRate.js.map