/**
 * 下单面板
 */

import React, { FC } from "react";
import { PlaceOrderHeader } from "./Head";
import { MarginTypeEnum } from "@shared/types";
import { AccountBalance } from "./Balance";
import { FuturesForm, FuturesFormProps } from "./FuturesForm";

export interface PlaceOrderProps extends FuturesFormProps {
  className?: string;
}
const PlaceOrder: FC<PlaceOrderProps> = props => {
  const { className, ...otherProps } = props;
  return (
    <div className="w-80 text-xs h-full min-h-screen text-derive-11 ">
      <PlaceOrderHeader leverage={10} marginType={MarginTypeEnum.Cross} />
      <FuturesForm {...otherProps} />
      <AccountBalance />
    </div>
  );
};

PlaceOrder.defaultProps = {};

export default PlaceOrder;
export { PlaceOrderHeader } from "./Head";
export { FuturesForm, IPlaceOrderParams, IPlaceStopOrderParams } from "./FuturesForm";
export {
  PlaceOrderTypeTab,
  OrderTypeTab,
  AvbBalance,
  OrderValue,
  OrderValueProps,
  Buttons,
  CenterQuantity,
  CloseValue,
  PlaceOrderInput,
  InputType,
  TimeInForce,
  PostOnly,
  PriceInput,
  QuantityInput,
  PriceSourceSelect
} from "./Form";
