<?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:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:minHeight="@dimen/library_item_height"
        android:background="?android:attr/selectableItemBackground">

    <ImageSwitcher
            android:id="@+id/icon"
            android:layout_width="@dimen/history_favicon_width_height"
            android:layout_height="@dimen/history_favicon_width_height"
            android:layout_marginStart="20dp"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintBottom_toBottomOf="parent">
        <ImageView
                android:id="@+id/favicon"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:padding="10dp"
                android:background="@drawable/favicon_background"
                android:backgroundTint="?neutral"
                android:importantForAccessibility="no"
                tools:src="@drawable/ic_folder_icon" />
        <ImageView
                android:id="@+id/checkmark"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:padding="10dp"
                android:background="@drawable/favicon_background"
                android:backgroundTint="?accentHighContrast"
                android:src="@drawable/mozac_ic_check" />
    </ImageSwitcher>

    <TextView
            android:id="@+id/title"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="12dp"
            android:ellipsize="end"
            android:singleLine="true"
            android:textAlignment="viewStart"
            android:textSize="18sp"
            android:textColor="?primaryText"
            tools:text="Example site"
            app:layout_constraintEnd_toStartOf="@id/overflow_menu"
            app:layout_constraintStart_toEndOf="@id/icon"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintBottom_toTopOf="@+id/url"
            app:layout_constraintVertical_chainStyle="packed"/>

    <TextView
            android:id="@+id/url"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="12dp"
            android:ellipsize="end"
            android:singleLine="true"
            android:textAlignment="viewStart"
            android:textColor="?secondaryText"
            android:textSize="12sp"
            tools:text="https://example.com/"
            app:layout_constraintEnd_toStartOf="@id/overflow_menu"
            app:layout_constraintStart_toEndOf="@id/icon"
            app:layout_constraintTop_toBottomOf="@+id/title"
            app:layout_constraintBottom_toBottomOf="parent" />

    <ImageButton
            android:id="@+id/overflow_menu"
            android:layout_width="@dimen/glyph_button_width"
            android:layout_height="@dimen/glyph_button_height"
            android:background="?android:attr/selectableItemBackgroundBorderless"
            android:contentDescription="@string/content_description_menu"
            android:src="@drawable/ic_menu"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent"/>

    <View
            android:id="@+id/separator"
            android:layout_width="0dp"
            android:layout_height="2dp"
            android:layout_marginStart="16dp"
            android:layout_marginEnd="16dp"
            android:importantForAccessibility="no"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            android:background="?neutralFaded"
            android:visibility="gone"/>

</androidx.constraintlayout.widget.ConstraintLayout>
