<?xml version="1.0" encoding="utf-8"?>
<org.thoughtcrime.securesms.components.InsetAwareConstraintLayout 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">

    <include layout="@layout/system_ui_guidelines" />

    <androidx.viewpager2.widget.ViewPager2
        android:id="@+id/preview_pager"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:orientation="horizontal"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        tools:background="@drawable/test_gradient" />

    <org.thoughtcrime.securesms.conversation.colors.ColorizerView
        android:id="@+id/colorizer"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <androidx.appcompat.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        android:background="@color/signal_background_primary"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="@id/status_bar_guideline"
        app:navigationIcon="@drawable/ic_arrow_left_24"
        app:title="@string/ChatWallpaperPreviewActivity__preview" />

    <TextView
        android:id="@+id/preview_today"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="20dp"
        android:background="@drawable/chat_wallpaper_preview_date_background"
        android:paddingStart="10dp"
        android:paddingTop="4dp"
        android:paddingEnd="10dp"
        android:paddingBottom="4dp"
        android:text="@string/DateUtils_today"
        android:textAppearance="@style/TextAppearance.Signal.Subtitle"
        android:textColor="@color/signal_text_secondary"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/toolbar" />

    <LinearLayout
        android:id="@+id/preview_bubble_1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="16dp"
        android:layout_marginTop="20dp"
        android:layout_marginEnd="48dp"
        android:background="@drawable/chat_wallpaper_preview_bubble_background"
        android:orientation="vertical"
        android:paddingStart="12dp"
        android:paddingTop="7dp"
        android:paddingEnd="12dp"
        android:paddingBottom="7dp"
        app:layout_constrainedWidth="true"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/preview_today">

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/ChatWallpaperPreviewActivity__swipe_to_preview_more_wallpapers"
            android:textAppearance="@style/Signal.Text.Body"
            android:textColor="@color/signal_text_primary" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/DateUtils_just_now"
            android:textAppearance="@style/Signal.Text.Caption"
            android:textColor="@color/signal_text_secondary" />

    </LinearLayout>

    <LinearLayout
        android:id="@+id/preview_bubble_2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="48dp"
        android:layout_marginTop="12dp"
        android:layout_marginEnd="16dp"
        android:background="@drawable/chat_wallpaper_preview_bubble_background_accent"
        android:orientation="vertical"
        android:paddingStart="12dp"
        android:paddingTop="7dp"
        android:paddingEnd="12dp"
        android:paddingBottom="7dp"
        app:layout_constrainedWidth="true"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="1"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/preview_bubble_1">

        <org.thoughtcrime.securesms.components.emoji.EmojiTextView
            android:id="@+id/preview_bubble_2_text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/ChatWallpaperPreviewActivity__set_wallpaper_for_all_chats"
            android:textAppearance="@style/Signal.Text.Body"
            android:textColor="@color/core_white" />

        <androidx.appcompat.widget.AppCompatTextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="end"
            android:drawablePadding="4dp"
            android:text="@string/DateUtils_just_now"
            android:textAppearance="@style/Signal.Text.Caption"
            android:textColor="@color/transparent_white_80"
            app:drawableEndCompat="@drawable/ic_delivery_status_read"
            app:drawableTint="@color/core_white" />
    </LinearLayout>

    <View
        android:id="@+id/preview_guideline"
        android:layout_width="match_parent"
        android:layout_height="60dp"
        android:background="@color/signal_background_primary"
        android:orientation="horizontal"
        app:layout_constraintBottom_toBottomOf="@id/navigation_bar_guideline" />

    <com.google.android.material.button.MaterialButton
        android:id="@+id/preview_set_wallpaper"
        style="@style/Signal.Widget.Button.Small.Primary"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/ChatWallpaperPreviewActivity__set_wallpaper"
        app:layout_constraintBottom_toBottomOf="@id/navigation_bar_guideline"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="@id/preview_guideline" />

</org.thoughtcrime.securesms.components.InsetAwareConstraintLayout>