<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".ui.home.activity.ProductServiceDetailActivity">

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/white">

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <androidx.constraintlayout.widget.ConstraintLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent">


                <com.seatel.mobilehall.util.customview.CustomTextView
                    android:id="@+id/main_title"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:gravity="center"
                    android:textColor="@color/colorPrimary"
                    android:textSize="25sp"
                    android:textStyle="bold"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

                <com.seatel.mobilehall.util.customview.CustomTextView
                    android:id="@+id/sub_title"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/margin_1x_size"
                    android:gravity="center"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/main_title" />

                <androidx.constraintlayout.widget.ConstraintLayout
                    android:id="@+id/layout_tab"
                    android:layout_width="match_parent"
                    android:layout_height="?actionBarSize"
                    android:layout_marginTop="@dimen/margin_3x_size"
                    android:background="@color/colorItemDataPack"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/sub_title">

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:background="@color/colorItemDataPack"
                        android:orientation="horizontal">


                        <com.seatel.mobilehall.util.customview.CustomButton
                            android:id="@+id/btn_benefit"
                            android:layout_width="match_parent"
                            android:layout_height="match_parent"
                            android:layout_weight="1"
                            android:background="@drawable/bg_button_cart"
                            android:gravity="center"
                            android:tag="BUTTON_BENEFIT"
                            android:text="@string/benefits"
                            android:textAllCaps="true"
                            android:textColor="@color/colorPrimary"
                            android:textStyle="bold" />


                        <com.seatel.mobilehall.util.customview.CustomButton
                            android:id="@+id/btn_term_condition"
                            android:layout_width="match_parent"
                            android:layout_height="match_parent"
                            android:layout_weight="1"
                            android:gravity="center"
                            android:tag="BUTTON_TERM_CONDITION"
                            android:text="@string/terms_and_condition"
                            android:textAllCaps="true"
                            android:textStyle="bold" />


                    </LinearLayout>


                </androidx.constraintlayout.widget.ConstraintLayout>

                <androidx.constraintlayout.widget.ConstraintLayout
                    android:id="@+id/frame_benefit"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_marginTop="12dp"
                    android:orientation="vertical"
                    app:layout_constraintTop_toBottomOf="@+id/layout_tab"
                    tools:layout_editor_absoluteX="109dp">


                    <LinearLayout
                        android:id="@+id/ln_tab"
                        android:layout_width="match_parent"
                        android:layout_height="?actionBarSize"
                        android:layout_marginTop="@dimen/margin_1x_size"
                        android:background="#5BE91E63"
                        android:orientation="horizontal"
                        android:padding="@dimen/margin_1x_size"
                        app:layout_constraintTop_toTopOf="parent">

                        <com.seatel.mobilehall.util.customview.CustomButton
                            android:layout_width="match_parent"
                            android:layout_height="match_parent"
                            android:layout_weight="1"
                            android:background="@color/colorPrimary"
                            android:gravity="center"
                            android:padding="@dimen/margin_1x_size"
                            android:text="Fee"
                            android:textAllCaps="true"
                            android:textColor="@color/white"
                            android:textSize="11sp"
                            android:textStyle="bold" />

                        <com.seatel.mobilehall.util.customview.CustomButton
                            android:id="@+id/btn_data_header"
                            android:layout_width="match_parent"
                            android:layout_height="match_parent"
                            android:layout_marginStart="2dp"
                            android:layout_weight="1"
                            android:background="@color/colorPrimary"
                            android:gravity="center"
                            android:padding="@dimen/margin_1x_size"
                            android:text="Data"
                            android:textAllCaps="true"
                            android:textColor="@color/white"
                            android:textSize="11sp"
                            android:textStyle="bold" />

                        <com.seatel.mobilehall.util.customview.CustomButton
                            android:id="@+id/call_sms"
                            android:layout_width="match_parent"
                            android:layout_height="match_parent"
                            android:layout_marginStart="2dp"
                            android:layout_weight="1"
                            android:background="@color/colorPrimary"
                            android:gravity="center"
                            android:padding="@dimen/margin_1x_size"
                            android:text="Call &amp; SMS"
                            android:textAllCaps="true"
                            android:textColor="@color/white"
                            android:textSize="@dimen/small_text_size"
                            android:textStyle="bold"
                            android:visibility="gone" />


                        <com.seatel.mobilehall.util.customview.CustomButton
                            android:layout_width="match_parent"
                            android:layout_height="match_parent"
                            android:layout_marginStart="2dp"
                            android:layout_weight="1"
                            android:background="@color/colorPrimary"
                            android:gravity="center"
                            android:text="Validity"
                            android:textAllCaps="true"
                            android:textColor="@color/white"
                            android:textSize="11sp"
                            android:textStyle="bold" />

                        <com.seatel.mobilehall.util.customview.CustomButton
                            android:layout_width="match_parent"
                            android:layout_height="match_parent"
                            android:layout_marginStart="2dp"
                            android:layout_weight="1"
                            android:background="@color/colorPrimary"
                            android:gravity="center"
                            android:text="Activation"
                            android:textAllCaps="true"
                            android:textColor="@color/white"
                            android:textSize="11sp"
                            android:textStyle="bold" />
                    </LinearLayout>

                    <androidx.recyclerview.widget.RecyclerView
                        android:id="@+id/mRecyclerPackage"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:nestedScrollingEnabled="false"
                        app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
                        app:layout_constraintTop_toBottomOf="@+id/ln_tab" />

                    <RelativeLayout
                        android:id="@+id/addon_frame"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="@dimen/margin_1x_size"
                        android:visibility="visible"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toBottomOf="@+id/mRecyclerPackage">

                        <com.seatel.mobilehall.util.customview.CustomTextView
                            android:id="@+id/tv_add_on"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_centerHorizontal="true"
                            android:background="@drawable/bg_button_primary"
                            android:gravity="center"
                            android:padding="@dimen/margin_2x_size"
                            android:text="Add-on package"
                            android:textColor="@color/white"
                            android:textSize="@dimen/extra_large_text_size"
                            android:textStyle="bold" />

                        <androidx.recyclerview.widget.RecyclerView
                            android:id="@+id/mRecyclerAddOn"
                            android:layout_width="match_parent"
                            android:layout_height="match_parent"
                            android:layout_below="@+id/tv_add_on"
                            android:layout_gravity="center"
                            android:layout_marginTop="@dimen/margin_1x_size"
                            android:nestedScrollingEnabled="false"
                            android:paddingBottom="@dimen/margin_1x_size" />

                        <com.seatel.mobilehall.util.customview.CustomTextView
                            android:id="@+id/base_validity"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_below="@+id/mRecyclerAddOn"
                            android:layout_marginStart="10dp"
                            android:layout_marginTop="5dp"
                            android:layout_marginBottom="5dp"
                            android:textStyle="bold"

                            />


                    </RelativeLayout>

                </androidx.constraintlayout.widget.ConstraintLayout>

                <androidx.constraintlayout.widget.ConstraintLayout
                    android:id="@+id/frame_term_condition"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_marginTop="@dimen/margin_1x_size"
                    android:visibility="gone"
                    app:layout_constraintTop_toBottomOf="@+id/layout_tab">

                    <androidx.recyclerview.widget.RecyclerView
                        android:id="@+id/mRecyclerTermCondition"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:nestedScrollingEnabled="false"
                        app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />

                    <com.seatel.mobilehall.util.customview.CustomTextView
                        android:id="@+id/tv_add_on_term_condition"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginStart="@dimen/margin_1x_size"
                        android:layout_marginTop="@dimen/margin_1x_size"
                        android:textSize="@dimen/large_text_size"
                        android:textStyle="bold"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toBottomOf="@+id/mRecyclerTermCondition" />

                    <androidx.recyclerview.widget.RecyclerView
                        android:id="@+id/mRecyclerAddOnTermCondition"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:layout_marginTop="@dimen/margin_1x_size"
                        android:nestedScrollingEnabled="false"
                        app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
                        app:layout_constraintTop_toBottomOf="@+id/tv_add_on_term_condition" />

                </androidx.constraintlayout.widget.ConstraintLayout>


            </androidx.constraintlayout.widget.ConstraintLayout>


        </RelativeLayout>


    </ScrollView>

    <com.seatel.mobilehall.util.customview.ErrorHandleView
        android:id="@+id/error_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />
</RelativeLayout>