<?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="wrap_content"
    android:background="@drawable/insight_modal_background"
    android:orientation="vertical">

    <androidx.appcompat.widget.AppCompatImageView
        android:id="@+id/insights_modal_close"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="16dp"
        android:layout_marginEnd="16dp"
        android:tint="@color/signal_icon_tint_primary"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:srcCompat="@drawable/ic_x" />

    <TextView
        android:id="@+id/insights_modal_title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="@dimen/insights_modal_title_margin_top"
        android:text="@string/InsightsModalFragment__title"
        android:textAppearance="@style/TextAppearance.Signal.SubHead.Insights"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <TextView
        android:id="@+id/insights_modal_description"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="16dp"
        android:layout_marginTop="@dimen/insights_modal_description_margin_top"
        android:layout_marginEnd="16dp"
        android:gravity="center"
        android:lineSpacingMultiplier="1.2"
        android:text="@string/InsightsModalFragment__description"
        android:textAppearance="@style/TextAppearance.Signal.Title.Insights"
        app:layout_constrainedWidth="true"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/insights_modal_title" />

    <org.thoughtcrime.securesms.components.ArcProgressBar
        android:id="@+id/insights_modal_progress"
        style="@style/Widget.Signal.ArcProgressBar"
        android:layout_width="@dimen/insights_modal_progress_size"
        android:layout_height="@dimen/insights_modal_progress_size"
        android:layout_marginTop="@dimen/insights_modal_progress_margin_top"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/insights_modal_description" />

    <org.thoughtcrime.securesms.components.AvatarImageView
        android:id="@+id/insights_modal_avatar"
        android:layout_width="@dimen/insights_modal_avatar_size"
        android:layout_height="@dimen/insights_modal_avatar_size"
        app:layout_constraintBottom_toBottomOf="@id/insights_modal_progress"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="@id/insights_modal_progress" />


    <LinearLayout
        android:id="@+id/insights_modal_percent_container"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        app:layout_constrainedWidth="true"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_chainStyle="packed"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/insights_modal_avatar">

        <TextView
            android:id="@+id/insights_modal_percent_secure"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:textAppearance="@style/TextAppearance.Signal.Headline.Insights.Modal.Percent"
            tools:text="100" />

        <TextView
            android:id="@+id/insights_modal_percent"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="bottom"
            android:gravity="center"
            android:text="@string/Insights__percent"
            android:textAppearance="@style/TextAppearance.Signal.SubHead.Insights.Modal.Percent" />
    </LinearLayout>

    <Button
        android:id="@+id/insights_modal_view_insights"
        style="@style/Widget.AppCompat.Button.Borderless"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="16dp"
        android:layout_marginTop="@dimen/insights_modal_view_insights_margin_top"
        android:layout_marginEnd="16dp"
        android:layout_marginBottom="20dp"
        android:background="@drawable/insights_cta_button_background"
        android:text="@string/InsightsModalFragment__view_insights"
        android:textAppearance="@style/TextAppearance.Signal.Caption.Insights"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/insights_modal_progress" />

</androidx.constraintlayout.widget.ConstraintLayout>