<?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/. -->
<LinearLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:id="@+id/tab_in_collection_item"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:clickable="true"
        android:clipToPadding="false"
        android:focusable="true"
        android:foreground="?android:attr/selectableItemBackground"
        android:background="?above"
        android:elevation="5dp">

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

        <ImageView
                android:id="@+id/collection_tab_icon"
                android:importantForAccessibility="no"
                android:layout_width="24dp"
                android:layout_height="24dp"
                android:layout_marginTop="23dp"
                android:layout_marginBottom="24dp"
                android:layout_marginStart="16dp"
                android:tint="@null"
                android:src="@drawable/ic_tab_collection"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"/>

        <TextView
                android:id="@+id/collection_tab_hostname"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:layout_marginStart="14dp"
                android:layout_marginEnd="74dp"
                android:ellipsize="end"
                android:maxLines="1"
                android:minLines="1"
                android:textAppearance="@style/Header12TextStyle"
                app:layout_constraintStart_toEndOf="@id/collection_tab_icon"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintEnd_toStartOf="@id/collection_tab_close_button"/>

        <TextView
                android:id="@+id/collection_tab_title"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginBottom="12dp"
                android:ellipsize="end"
                android:maxLines="2"
                android:minLines="2"
                android:textAppearance="@style/Body14TextStyle"
                app:layout_constraintStart_toStartOf="@id/collection_tab_hostname"
                app:layout_constraintTop_toBottomOf="@id/collection_tab_hostname"
                app:layout_constraintEnd_toEndOf="@id/collection_tab_hostname"
                app:layout_constraintBottom_toBottomOf="parent"/>

        <ImageButton
                android:id="@+id/collection_tab_close_button"
                android:layout_width="48dp"
                android:layout_height="48dp"
                android:background="?android:attr/selectableItemBackgroundBorderless"
                android:contentDescription="@string/close_tab"
                android:src="@drawable/ic_close"
                android:alpha="0.8"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintBottom_toBottomOf="parent"/>

        <View
                android:id="@+id/divider_line"
                android:layout_width="fill_parent"
                android:layout_height="1dp"
                android:background="?neutralFaded"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintBottom_toBottomOf="parent"/>

    </androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
