package cn.muchinfo.rma.view.base.future.costs

import android.os.Parcel
import android.os.Parcelable

class OrderDetailData() : Parcelable {
    private var leftText: String? = null
    private var rightText: String? = null
    private var leftStyle: Int = 0
    private var rightStyle: Int = 0
    private var rightTextPadding: Int = 0
    private var leftTextPadding: Int = 0

    constructor(parcel: Parcel) : this() {
        leftText = parcel.readString()
        rightText = parcel.readString()
        leftStyle = parcel.readInt()
        rightStyle = parcel.readInt()
        rightTextPadding = parcel.readInt()
        leftTextPadding = parcel.readInt()
    }



    fun getLeftText() : String {
        return leftText!!
    }
    fun getRightText() : String {
        return rightText!!
    }
    fun getLeftStyle() : Int {
        return leftStyle
    }
    fun getRightStyle() : Int {
        return rightStyle
    }
    fun getRightTextPadding() : Int {
        return rightTextPadding
    }
    fun getLeftTextPadding() : Int {
        return leftTextPadding
    }

    fun setLeftText(leftText: String?) {
        this.leftText = leftText
    }
    fun setRightText(rightText: String?) {
        this.rightText = rightText
    }
    fun setLeftStyle(leftStyle: Int) {
        this.leftStyle = leftStyle
    }
    fun setRightStyle(rightStyle: Int) {
        this.rightStyle = rightStyle
    }
    fun setRightTextPadding(rightTextPadding: Int) {
        this.rightTextPadding = rightTextPadding
    }
    fun setLeftTextPadding(leftTextPadding: Int) {
        this.leftTextPadding = leftTextPadding
    }

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeString(leftText)
        parcel.writeString(rightText)
        parcel.writeInt(leftStyle)
        parcel.writeInt(rightStyle)
        parcel.writeInt(rightTextPadding)
        parcel.writeInt(leftTextPadding)
    }

    override fun describeContents(): Int {
        return 0
    }

    companion object CREATOR : Parcelable.Creator<OrderDetailData> {
        override fun createFromParcel(parcel: Parcel): OrderDetailData {
            return OrderDetailData(parcel)
        }

        override fun newArray(size: Int): Array<OrderDetailData?> {
            return arrayOfNulls(size)
        }
    }
}