using System;
using Betfair.Gamex.API.Entities;

namespace Betfair.Gamex.API.UberClient.Classes
{
	public enum BetStatus
	{
		Open,
		Placed,
		Edited,
		Cancelled
	}

	/// <summary>
	/// Extended bet details
	/// </summary>
	public class Bet : postBetOrderBetPlace
	{
		private string m_selectionName = string.Empty;
		private int m_MarketID = 0;
		private int m_Round = 0;
		private string m_Currency = string.Empty;
		private long m_BetID = 0;
		private BetStatus m_BetStatus;
		private double m_OriginalPlacedSize;
		private double m_OriginalPlacedPrice;

        /// <summary>
        /// Constructor
        /// </summary>
		public Bet()
        {
        }

        /// <summary>
        /// Constructor
        /// </summary>
        public Bet(betBidTypeEnum betType, int selectionID, int marketID, int round, string selectionName, string currency, double price)
		{
			base.bidType = betType;
			base.selectionId = selectionID;
			this.m_selectionName = selectionName;
			this.m_MarketID = marketID;
			this.m_Round = round;
			this.m_Currency = currency;
			this.m_BetStatus = BetStatus.Open;
			this.m_OriginalPlacedPrice = 0;
			this.m_OriginalPlacedSize = 0;
            this.price = price;
		}

		public double OriginalPlacedSize
		{
			get { return m_OriginalPlacedSize; }	
			set { m_OriginalPlacedSize = value; }
		}

		public double OriginalPlacedPrice
		{
			get { return m_OriginalPlacedPrice; }	
			set { m_OriginalPlacedPrice = value; }
		}

		public BetStatus Status
		{
			get { return m_BetStatus; }	
			set { m_BetStatus = value; }
		}

		public long BetID
		{
			get { return m_BetID; }	
			set { m_BetID = value; }
		}

		public string SelectionName
		{
			get { return m_selectionName; }	
			set { m_selectionName = value; }
		}

		public int MarketID
		{
			get { return m_MarketID; }	
			set { m_MarketID = value; }
		}

		public int Round
		{
			get { return m_Round; }	
			set { m_Round = value; }
		}

		public string Currency
		{
			get{ return m_Currency; }
			set{ m_Currency = value; }
		}
	}
}
