<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/dashContentLayout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:background="#F2F3F8"
    tools:context=".dashboardcollection.view.DashboardCollectionView">

    <androidx.constraintlayout.widget.Guideline
        android:id="@+id/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/guideline2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        app:layout_constraintGuide_percent="0.98" />

    <androidx.cardview.widget.CardView
            android:id="@+id/dashTargetProgressContainer"
            android:layout_marginTop="@dimen/activity_vertical_margin"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintStart_toEndOf="@id/guideline"
            app:layout_constraintEnd_toStartOf="@id/guideline2"
            app:cardCornerRadius="5dp"
            app:cardElevation="2dp"
            android:layout_width="0dp"
            android:layout_height="wrap_content">
            <androidx.constraintlayout.widget.ConstraintLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content">
                <TextView
                    android:id="@+id/dashTargetTitle"
                    app:layout_constraintTop_toTopOf="parent"
                    android:layout_marginTop="8dp"
                    android:layout_marginLeft="10dp"
                    android:text="@string/target_collected"
                    android:textSize="16sp"
                    android:textStyle="bold"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content" />

                <TextView
                    android:id="@+id/dashProgressValue"
                    android:layout_width="wrap_content"
                    android:layout_height="17dp"
                    android:layout_marginLeft="10dp"
                    android:layout_marginTop="15dp"
                    android:text="0 / 0 IDR"
                    android:textColor="#585D66"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@id/dashTargetTitle" />

                <TextView
                    android:id="@+id/dashProgressPercent"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:gravity="right"
                    android:text="0 %"
                    android:textColor="@color/gradient_start"
                    android:textSize="20sp"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toEndOf="@id/dashProgressValue"
                    app:layout_constraintTop_toBottomOf="@id/dashTargetTitle" />

                <ProgressBar
                    android:id="@+id/dashTargetProgress"
                    android:layout_marginTop="3dp"
                    app:layout_constraintTop_toBottomOf="@id/dashProgressValue"
                    app:layout_constraintBottom_toBottomOf="parent"
                    android:layout_marginLeft="10dp"
                    android:layout_marginRight="10dp"
                    android:layout_marginBottom="@dimen/activity_vertical_margin"
                    style="?android:attr/progressBarStyleHorizontal"
                    android:progressDrawable="@drawable/dashboard_progress_drawable"
                    android:indeterminate="false"
                    android:layout_width="match_parent"
                    android:layout_height="13dp" />
            </androidx.constraintlayout.widget.ConstraintLayout>

        </androidx.cardview.widget.CardView>

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_marginTop="@dimen/activity_vertical_margin"
        android:id="@+id/collectSummary"
        app:layout_constraintStart_toEndOf="@id/guideline"
        app:layout_constraintEnd_toStartOf="@id/guideline2"
        app:layout_constraintTop_toBottomOf="@id/dashTargetProgressContainer"
        android:layout_width="0dp"
        android:layout_height="wrap_content">

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

        <androidx.cardview.widget.CardView
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toStartOf="@id/guidelineTwoColumn"
            android:layout_marginRight="5dp"
            app:cardCornerRadius="5dp"
            app:cardElevation="2dp"
            android:layout_width="0dp"
            android:layout_height="180dp">
            <androidx.constraintlayout.widget.ConstraintLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent">
                <TextView
                    android:id="@+id/dashOutstandingTitle"
                    app:layout_constraintTop_toTopOf="parent"
                    android:padding="5dp"
                    android:text="@string/outstanding_task"
                    android:gravity="center"
                    android:textSize="16sp"
                    android:textStyle="bold"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content" />

                <TextView
                    android:id="@+id/dashOutstandingValue"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="10dp"
                    android:gravity="center"
                    android:text="0"
                    android:textColor="@color/gradient_start"
                    android:textSize="60sp"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@id/dashOutstandingTitle" />

                <TextView
                    android:id="@+id/dashOutstandingAmount"
                    app:layout_constraintTop_toBottomOf="@id/dashOutstandingValue"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintBottom_toBottomOf="parent"
                    android:layout_marginTop="10dp"
                    android:text="0 IDR"
                    android:textColor="#585D66"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content" />

            </androidx.constraintlayout.widget.ConstraintLayout>
        </androidx.cardview.widget.CardView>

        <androidx.cardview.widget.CardView
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toEndOf="@id/guidelineTwoColumn"
            android:layout_marginLeft="5dp"
            app:cardCornerRadius="5dp"
            app:cardElevation="2dp"
            android:layout_width="0dp"
            android:layout_height="180dp">
            <androidx.constraintlayout.widget.ConstraintLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent">

                <TextView
                    android:id="@+id/dashCollResultTitle"
                    app:layout_constraintTop_toTopOf="parent"
                    android:padding="5dp"
                    android:text="@string/collection_result"
                    android:gravity="center"
                    android:textSize="16sp"
                    android:textStyle="bold"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content" />

                <com.github.mikephil.charting.charts.PieChart
                    android:id="@+id/dashCollResultPie"
                    app:layout_constraintTop_toBottomOf="@id/dashCollResultTitle"
                    app:layout_constraintLeft_toLeftOf="parent"
                    app:layout_constraintRight_toRightOf="parent"
                    app:layout_constraintTop_toTopOf="parent"
                    app:layout_constraintBottom_toBottomOf="parent"
                    android:layout_width="100dp"
                    android:layout_height="100dp" />
                <LinearLayout
                    app:layout_constraintTop_toBottomOf="@id/dashCollResultPie"
                    app:layout_constraintLeft_toLeftOf="parent"
                    app:layout_constraintRight_toRightOf="parent"
                    app:layout_constraintBottom_toBottomOf="parent"
                    android:orientation="horizontal"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content">

                    <TextView
                        android:id="@+id/dashCollectedLegend"
                        android:text="Collected"
                        android:textSize="12dp"
                        android:textColor="#1D6304"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content" />

                    <TextView
                        android:id="@+id/dashPtpLegend"
                        android:text="PTP"
                        android:textColor="#221E66"
                        android:textSize="12dp"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content" />

                    <TextView
                        android:id="@+id/dashFailedLegend"
                        android:text="Failed"
                        android:textSize="12dp"
                        android:textColor="#C61E00"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content" />

                </LinearLayout>

            </androidx.constraintlayout.widget.ConstraintLayout>
        </androidx.cardview.widget.CardView>

    </androidx.constraintlayout.widget.ConstraintLayout>

    <TextView
        app:layout_constraintTop_toBottomOf="@id/collectSummary"
        android:id="@+id/dashResultDetailTitle"
        android:layout_marginTop="@dimen/activity_vertical_margin"
        app:layout_constraintStart_toEndOf="@id/guideline"
        app:layout_constraintEnd_toStartOf="@id/guideline2"
        android:text="@string/collection_result_detail"
        android:textSize="16sp"
        android:textStyle="bold"
        android:layout_width="0dp"
        android:layout_height="wrap_content" />

    <androidx.cardview.widget.CardView
        android:id="@+id/collResultDetailCard"
        app:layout_constraintTop_toBottomOf="@id/dashResultDetailTitle"
        app:layout_constraintStart_toEndOf="@id/guideline"
        app:layout_constraintEnd_toStartOf="@id/guideline2"
        app:layout_constraintBottom_toBottomOf="parent"
        android:layout_marginBottom="5dp"
        android:layout_marginTop="5dp"
        app:cardCornerRadius="5dp"
        app:cardElevation="2dp"
        android:layout_width="0dp"
        android:layout_height="0dp">

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

            <com.google.android.material.tabs.TabLayout
                app:layout_constraintTop_toTopOf="parent"
                android:id="@+id/dashDetailTab"
                android:layout_width="match_parent"
                app:tabTextAppearance="@style/DashboardCollTabText"
                android:layout_height="wrap_content" />

            <androidx.viewpager.widget.ViewPager
                app:layout_constraintTop_toBottomOf="@id/dashDetailTab"
                app:layout_constraintBottom_toBottomOf="parent"
                android:id="@+id/dashViewPager"
                android:layout_width="match_parent"
                android:layout_height="0dp" />

        </androidx.constraintlayout.widget.ConstraintLayout>

    </androidx.cardview.widget.CardView>

</androidx.constraintlayout.widget.ConstraintLayout>