<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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"
    android:background="@color/colorBackground"
    android:clickable="true"
    android:focusable="true"
    tools:context=".screen.report.StatementFragment">

    <View
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@drawable/app_background" />

    <androidx.constraintlayout.widget.Guideline
        android:id="@+id/top_guideline"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        app:layout_constraintGuide_percent="0.02" />

    <androidx.constraintlayout.widget.Guideline
        android:id="@+id/bottom_guideline"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        app:layout_constraintGuide_percent="0.90" />

    <androidx.constraintlayout.widget.Guideline
        android:id="@+id/video_guideline"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        app:layout_constraintGuide_percent="0.02" />

    <androidx.constraintlayout.widget.Guideline
        android:id="@+id/right_guideline"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        app:layout_constraintGuide_percent="0.98" />

    <!--Tab-->
    <View
        android:id="@+id/tv_table"
        android:layout_width="0dp"
        android:layout_height="40dp"
        android:layout_marginStart="8dp"
        android:layout_marginEnd="8dp"
        android:background="@drawable/bg_table_header"
        android:padding="8dp"
        android:textAlignment="center"
        app:layout_constraintEnd_toStartOf="@+id/right_guideline"
        app:layout_constraintStart_toStartOf="@+id/video_guideline"
        app:layout_constraintTop_toBottomOf="@+id/top_guideline" />

    <View
        android:id="@+id/v_tab1"
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:layout_constraintBottom_toBottomOf="@+id/tv_table"
        app:layout_constraintEnd_toStartOf="@+id/v_tab2"
        app:layout_constraintStart_toStartOf="@id/tv_table"
        app:layout_constraintTop_toTopOf="@+id/tv_table" />

    <View
        android:id="@+id/v_tab2"
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:layout_constraintBottom_toBottomOf="@+id/v_tab1"
        app:layout_constraintEnd_toStartOf="@+id/v_tab3"
        app:layout_constraintStart_toEndOf="@id/v_tab1"
        app:layout_constraintTop_toTopOf="@+id/v_tab1" />

    <View
        android:id="@+id/v_tab3"
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:layout_constraintBottom_toBottomOf="@+id/v_tab2"
        app:layout_constraintEnd_toEndOf="@id/tv_table"
        app:layout_constraintStart_toEndOf="@+id/v_tab2"
        app:layout_constraintTop_toTopOf="@+id/v_tab2" />

    <ImageView
        android:id="@+id/img_tab1"
        android:layout_width="28dp"
        android:layout_height="wrap_content"
        android:adjustViewBounds="true"
        android:src="@drawable/ic_tab_win"
        app:layout_constraintBottom_toBottomOf="@+id/v_tab1"
        app:layout_constraintEnd_toEndOf="@+id/v_tab1"
        app:layout_constraintStart_toStartOf="@id/v_tab1"
        app:layout_constraintTop_toTopOf="@+id/v_tab1" />

    <ImageView
        android:id="@+id/img_tab2"
        android:layout_width="28dp"
        android:layout_height="wrap_content"
        android:adjustViewBounds="true"
        android:src="@drawable/ic_tab_play"
        app:layout_constraintBottom_toBottomOf="@+id/v_tab2"
        app:layout_constraintEnd_toEndOf="@+id/v_tab2"
        app:layout_constraintStart_toStartOf="@id/v_tab2"
        app:layout_constraintTop_toTopOf="@+id/v_tab2" />

    <ImageView
        android:id="@+id/img_tab3"
        android:layout_width="28dp"
        android:layout_height="wrap_content"
        android:adjustViewBounds="true"
        android:src="@drawable/ic_tab_report"
        app:layout_constraintBottom_toBottomOf="@+id/v_tab3"
        app:layout_constraintEnd_toEndOf="@+id/v_tab3"
        app:layout_constraintStart_toStartOf="@id/v_tab3"
        app:layout_constraintTop_toTopOf="@+id/v_tab3" />

    <View
        android:id="@+id/bg_select_tab1"
        android:layout_width="0dp"
        android:layout_height="4dp"
        android:background="@drawable/bg_box"
        android:visibility="visible"
        app:layout_constraintBottom_toBottomOf="@+id/tv_table"
        app:layout_constraintEnd_toEndOf="@+id/v_tab1"
        app:layout_constraintStart_toStartOf="@id/v_tab1" />

    <View
        android:id="@+id/bg_select_tab2"
        android:layout_width="0dp"
        android:layout_height="4dp"
        android:background="@color/color_white"
        android:visibility="invisible"
        app:layout_constraintBottom_toBottomOf="@+id/tv_table"
        app:layout_constraintEnd_toEndOf="@+id/v_tab2"
        app:layout_constraintStart_toStartOf="@id/v_tab2" />

    <View
        android:id="@+id/bg_select_tab3"
        android:layout_width="0dp"
        android:layout_height="4dp"
        android:background="@color/color_white"
        android:visibility="invisible"
        app:layout_constraintBottom_toBottomOf="@+id/tv_table"
        app:layout_constraintEnd_toEndOf="@+id/v_tab3"
        app:layout_constraintStart_toStartOf="@id/v_tab3" />

    <View
        android:id="@+id/v_background"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:background="@drawable/bg_recyclerview"
        app:layout_constraintBottom_toTopOf="@id/bottom_guideline"
        app:layout_constraintEnd_toEndOf="@id/tv_table"
        app:layout_constraintStart_toStartOf="@id/tv_table"
        app:layout_constraintTop_toBottomOf="@id/tv_table" />

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/rv_tb1"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_marginStart="2dp"
        android:layout_marginEnd="2dp"
        android:background="@android:color/transparent"
        android:clipToPadding="false"
        android:paddingBottom="8dp"
        android:visibility="visible"
        app:layout_constraintBottom_toBottomOf="@+id/v_background"
        app:layout_constraintEnd_toEndOf="@id/v_background"
        app:layout_constraintStart_toStartOf="@id/v_background"
        app:layout_constraintTop_toTopOf="@id/v_background" />

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/rv_tb2"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_marginStart="2dp"
        android:layout_marginEnd="2dp"
        android:background="@android:color/transparent"
        android:clipToPadding="false"
        android:paddingBottom="8dp"
        android:visibility="invisible"
        app:layout_constraintBottom_toBottomOf="@+id/v_background"
        app:layout_constraintEnd_toEndOf="@id/v_background"
        app:layout_constraintStart_toStartOf="@id/v_background"
        app:layout_constraintTop_toTopOf="@id/v_background" />

    <ProgressBar
        android:id="@+id/progress"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintBottom_toBottomOf="@+id/v_background"
        app:layout_constraintEnd_toEndOf="@+id/v_background"
        app:layout_constraintStart_toStartOf="@+id/v_background"
        app:layout_constraintTop_toTopOf="@+id/v_background" />

    <!--    tab3-->
    <androidx.constraintlayout.widget.Group
        android:id="@+id/tab3"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:visibility="invisible"
        app:constraint_referenced_ids="v_header_c1,
        v_header_c2,v_header_c3,v_header_c4,,
img_header_c2,img_header_c3,img_header_c4,v_line_c1,v_line_c2,v_line_c3,rv_tb3" />

    <View
        android:id="@+id/v_header_c1"
        android:layout_width="40dp"
        android:layout_height="40dp"
        android:layout_marginTop="1dp"
        android:background="#243151"
        app:layout_constraintEnd_toStartOf="@+id/v_header_c2"
        app:layout_constraintStart_toStartOf="@id/v_background"
        app:layout_constraintTop_toTopOf="@id/v_background" />

    <View
        android:id="@+id/v_header_c2"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:background="#243151"
        app:layout_constraintBottom_toBottomOf="@id/v_header_c1"
        app:layout_constraintEnd_toStartOf="@id/v_header_c3"
        app:layout_constraintStart_toEndOf="@id/v_header_c1"
        app:layout_constraintTop_toTopOf="@id/v_header_c1" />

    <ImageView
        android:id="@+id/img_header_c2"
        android:layout_width="0dp"
        android:layout_height="14dp"
        android:layout_marginStart="8dp"
        android:layout_marginEnd="8dp"
        android:adjustViewBounds="true"
        android:src="@drawable/text_statement_date"
        app:layout_constraintBottom_toBottomOf="@+id/v_header_c2"
        app:layout_constraintEnd_toEndOf="@+id/v_header_c2"
        app:layout_constraintStart_toStartOf="@id/v_header_c2"
        app:layout_constraintTop_toTopOf="@+id/v_header_c2" />

    <View
        android:id="@+id/v_header_c3"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:background="#243151"
        app:layout_constraintBottom_toBottomOf="@id/v_header_c1"
        app:layout_constraintEnd_toStartOf="@id/v_header_c4"
        app:layout_constraintStart_toEndOf="@id/v_header_c2"
        app:layout_constraintTop_toTopOf="@id/v_header_c1" />

    <ImageView
        android:id="@+id/img_header_c3"
        android:layout_width="0dp"
        android:layout_height="17dp"
        android:layout_marginStart="8dp"
        android:layout_marginEnd="8dp"
        android:adjustViewBounds="true"
        android:src="@drawable/text_bet_amount"
        app:layout_constraintBottom_toBottomOf="@+id/v_header_c3"
        app:layout_constraintEnd_toEndOf="@+id/v_header_c3"
        app:layout_constraintStart_toStartOf="@id/v_header_c3"
        app:layout_constraintTop_toTopOf="@+id/v_header_c3" />

    <View
        android:id="@+id/v_header_c4"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:background="#243151"
        app:layout_constraintBottom_toBottomOf="@id/v_header_c1"
        app:layout_constraintEnd_toEndOf="@id/v_background"
        app:layout_constraintStart_toEndOf="@id/v_header_c3"
        app:layout_constraintTop_toTopOf="@id/v_header_c1" />

    <ImageView
        android:id="@+id/img_header_c4"
        android:layout_width="0dp"
        android:layout_height="16dp"
        android:layout_marginStart="8dp"
        android:layout_marginEnd="8dp"
        android:adjustViewBounds="true"
        android:src="@drawable/text_statement_winlose"
        app:layout_constraintBottom_toBottomOf="@+id/v_header_c4"
        app:layout_constraintEnd_toEndOf="@+id/v_header_c4"
        app:layout_constraintStart_toStartOf="@id/v_header_c4"
        app:layout_constraintTop_toTopOf="@+id/v_header_c4" />

    <View
        android:id="@+id/v_line_c1"
        android:layout_width="1dp"
        android:layout_height="0dp"
        android:layout_margin="1dp"
        android:background="@color/color_gray_600"
        app:layout_constraintBottom_toBottomOf="@id/v_background"
        app:layout_constraintStart_toEndOf="@id/v_header_c1"
        app:layout_constraintTop_toTopOf="@id/v_background" />

    <View
        android:id="@+id/v_line_c2"
        android:layout_width="1dp"
        android:layout_height="0dp"
        android:layout_margin="1dp"
        android:background="@color/color_gray_600"
        app:layout_constraintBottom_toBottomOf="@id/v_background"
        app:layout_constraintStart_toEndOf="@id/v_header_c2"
        app:layout_constraintTop_toTopOf="@id/v_line_c1" />

    <View
        android:id="@+id/v_line_c3"
        android:layout_width="1dp"
        android:layout_height="0dp"
        android:layout_margin="1dp"
        android:background="@color/color_gray_600"
        app:layout_constraintBottom_toBottomOf="@id/v_background"
        app:layout_constraintStart_toEndOf="@id/v_header_c3"
        app:layout_constraintTop_toTopOf="@id/v_line_c1" />

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/rv_tb3"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_marginStart="2dp"
        android:layout_marginEnd="2dp"
        android:background="@android:color/transparent"
        android:clipToPadding="false"
        android:paddingBottom="8dp"
        android:visibility="visible"
        app:layout_constraintBottom_toBottomOf="@+id/v_background"
        app:layout_constraintEnd_toEndOf="@id/v_background"
        app:layout_constraintStart_toStartOf="@id/v_background"
        app:layout_constraintTop_toBottomOf="@id/v_header_c1"
        tools:listitem="@layout/item_report" />

    <!--    Bottom Button-->
    <ImageView
        android:id="@+id/btn_close"
        android:layout_width="wrap_content"
        android:layout_height="40dp"
        android:adjustViewBounds="true"
        android:scaleType="fitXY"
        android:src="@drawable/ic_btn_close"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/bottom_guideline" />
</androidx.constraintlayout.widget.ConstraintLayout>