import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { memo } from "react";
import { Statistic } from "../../../../../statistic";
import { useFundingRate } from "@orderly.network/hooks";
import { Numeral } from "../../../../../text";
const FundingRate = (props)=>{
    const data = useFundingRate(props.symbol);
    return /*#__PURE__*/ _jsx(Statistic, {
        label: "Pred. funding rate",
        value: /*#__PURE__*/ _jsxs("div", {
            className: "orderly-flex flex-nowrap",
            children: [
                /*#__PURE__*/ _jsx(Numeral, {
                    className: "orderly-text-warning",
                    unit: "%",
                    precision: 4,
                    padding: true,
                    children: data.est_funding_rate
                }),
                /*#__PURE__*/ _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."
    });
};
export const MemoizedCompnent = /*#__PURE__*/ memo(FundingRate);

//# sourceMappingURL=fundingRate.js.map