<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<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:id="@+id/collection_constraint_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:clipToPadding="false">

    <Button
        android:id="@+id/back_button"
        android:layout_width="wrap_content"
        android:layout_height="0dp"
        android:layout_margin="16dp"
        android:background="?android:attr/selectableItemBackgroundBorderless"
        android:drawablePadding="8dp"
        android:gravity="start|center_vertical"
        android:text="@string/create_collection_select_collection"
        android:textAppearance="@style/HeaderTextStyle"
        android:textColor="@color/fx_mobile_text_color_oncolor_primary"
        android:textSize="20sp"
        app:drawableStartCompat="@drawable/mozac_ic_back"
        app:drawableTint="@color/fx_mobile_icon_color_oncolor"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        tools:ignore="ButtonStyleXmlDetector" />

    <Button
        android:id="@+id/select_all_button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="16dp"
        android:alpha="0"
        android:background="?android:attr/selectableItemBackgroundBorderless"
        android:text="@string/create_collection_select_all"
        android:textAllCaps="false"
        android:textColor="@color/fx_mobile_text_color_oncolor_primary"
        android:textSize="16sp"
        android:visibility="gone"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        tools:ignore="ButtonStyleXmlDetector" />

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/collections_list"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_marginStart="@dimen/component_collection_creation_list_margin"
        android:layout_marginTop="@dimen/component_collection_creation_list_margin"
        android:layout_marginEnd="@dimen/component_collection_creation_list_margin"
        app:layout_constraintBottom_toTopOf="@id/bottom_button_bar_layout"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/back_button"
        tools:listitem="@layout/collections_list_item" />

    <EditText
        android:id="@+id/name_collection_edittext"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom|center"
        android:alpha="0"
        android:autofillHints="false"
        android:background="?attr/layer1"
        android:focusedByDefault="true"
        android:hint="@string/collection_name_hint"
        android:imeOptions="actionDone"
        android:importantForAutofill="no"
        android:inputType="textCapSentences"
        android:paddingStart="20dp"
        android:paddingTop="12dp"
        android:paddingEnd="20dp"
        android:paddingBottom="12dp"
        android:text="@string/create_collection_default_name"
        android:textColor="?attr/textPrimary"
        android:textSize="16sp"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="parent"
        tools:targetApi="o" />

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/tab_list"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_marginStart="@dimen/component_collection_creation_list_margin"
        android:layout_marginTop="@dimen/component_collection_creation_list_margin"
        android:layout_marginEnd="@dimen/component_collection_creation_list_margin"
        android:fadingEdgeLength="30dp"
        android:requiresFadingEdge="vertical"
        android:visibility="gone"
        app:layout_constraintBottom_toTopOf="@id/bottom_button_bar_layout"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/back_button"
        tools:listitem="@layout/collection_tab_list_row" />

    <View
        android:id="@+id/tab_list_dim"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:background="?scrim"
        android:visibility="gone"
        app:layout_constraintBottom_toTopOf="@id/collections_list"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/bottom_button_bar_layout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="16dp"
        android:alpha="1.0"
        android:background="@drawable/add_tabs_to_collection_background"
        android:clipToPadding="false"
        android:visibility="visible"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent">

        <ImageButton
            android:id="@+id/bottom_bar_icon_button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_margin="16dp"
            android:background="?android:attr/selectableItemBackground"
            android:importantForAccessibility="no"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:srcCompat="@drawable/ic_new"
            app:tint="?iconOnColor" />

        <TextView
            android:id="@+id/bottom_bar_text"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="8dp"
            android:layout_marginEnd="8dp"
            android:gravity="center_vertical"
            android:singleLine="true"
            android:text="@string/create_collection_add_new_collection"
            android:textColor="?textActionPrimary"
            android:textSize="16sp"
            android:textStyle="bold"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toStartOf="@id/save_button"
            app:layout_constraintStart_toEndOf="@id/bottom_bar_icon_button"
            app:layout_constraintTop_toTopOf="parent" />

        <Button
            android:id="@+id/save_button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:alpha="0.0"
            android:background="?android:attr/selectableItemBackground"
            android:text="@string/create_collection_save"
            android:textAppearance="@style/TextAppearance.MaterialComponents.Button"
            android:textColor="?textActionPrimary"
            android:visibility="gone"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            tools:ignore="ButtonStyleXmlDetector" />
    </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
