/**
 * 可平
 */
import React, { FC } from "react";
import { formatFloor } from "@utils/FormatNumber";
interface Props {
  buyValue?: string | number;
  sellValue?: string | number;
  unit?: string;
  scale?: number;
}

export const CloseValue: FC<Props> = props => {
  const { scale, unit = "" } = props;
  return (
    <div className={"flex justify-between nts-orderValue-root mb-[20px]"}>
      <div className="nts-orderValue-buy text-left">
        <span className="mb-[2px]">可平</span>
        <div className="text-gray-16">
          {formatFloor(props.buyValue ?? 0, scale)} {unit}
        </div>
      </div>
      <div className="nts-orderValue-sell text-right">
        <span className="mb-[2px]">可平</span>
        <div className="text-gray-16">
          {formatFloor(props.sellValue ?? 0, scale)} {unit}
        </div>
      </div>
    </div>
  );
};

CloseValue.defaultProps = {};
