<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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:id="@+id/syncProgressOverlay"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/brand_window_bg"
    android:clickable="true"
    android:elevation="24dp"
    android:focusable="true"
    android:importantForAccessibility="yes"
    android:visibility="gone">

    <LinearLayout
        android:id="@+id/syncProgressPanel"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="center"
        android:orientation="vertical"
        android:paddingStart="28dp"
        android:paddingTop="40dp"
        android:paddingEnd="28dp"
        android:paddingBottom="40dp">

        <TextView
            android:id="@+id/syncProgressTitle"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center_horizontal"
            android:textAppearance="?attr/textAppearanceTitleMedium"
            android:textColor="@color/brand_text_muted"
            tools:text="Synchronization" />

        <FrameLayout
            android:layout_width="112dp"
            android:layout_height="112dp"
            android:layout_marginTop="28dp"
            android:background="@drawable/bg_sync_icon_stage">

            <com.google.android.material.progressindicator.CircularProgressIndicator
                android:id="@+id/syncProgressRing"
                android:layout_width="88dp"
                android:layout_height="88dp"
                android:layout_gravity="center"
                android:indeterminate="true"
                app:indicatorColor="@color/brand_purple"
                app:indicatorSize="88dp"
                app:trackColor="@color/brand_loading_track"
                app:trackThickness="4dp" />

            <ImageView
                android:id="@+id/syncProgressPhaseIcon"
                android:layout_width="42dp"
                android:layout_height="42dp"
                android:layout_gravity="center"
                android:contentDescription="@null"
                android:importantForAccessibility="no"
                android:scaleType="centerInside"
                android:src="@drawable/ic_sync_phase_prepare"
                app:tint="@color/brand_purple"
                tools:ignore="ContentDescription" />
        </FrameLayout>

        <TextView
            android:id="@+id/syncProgressStatus"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="28dp"
            android:gravity="center_horizontal"
            android:textAppearance="?attr/textAppearanceHeadlineSmall"
            android:textColor="@color/brand_text_dark"
            android:textStyle="bold"
            tools:text="Downloading client information" />

        <TextView
            android:id="@+id/syncProgressSubtitle"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp"
            android:gravity="center_horizontal"
            android:lineSpacingExtra="3dp"
            android:maxWidth="360dp"
            android:textAppearance="?attr/textAppearanceBodyMedium"
            android:textColor="@color/brand_text_muted"
            tools:text="Please keep the app open until synchronization completes." />

        <FrameLayout
            android:id="@+id/syncProgressTrack"
            android:layout_width="match_parent"
            android:layout_height="36dp"
            android:layout_marginTop="28dp">

            <com.google.android.material.progressindicator.LinearProgressIndicator
                android:id="@+id/syncProgressBar"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="center_vertical"
                android:indeterminate="false"
                android:max="6"
                android:progress="0"
                app:indicatorColor="@color/brand_purple"
                app:trackColor="@color/brand_loading_track"
                app:trackCornerRadius="3dp"
                app:trackThickness="6dp" />

            <LinearLayout
                android:id="@+id/syncCheckpointList"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:gravity="center_vertical"
                android:orientation="horizontal" />
        </FrameLayout>
    </LinearLayout>
</FrameLayout>
