<?xml version="1.0" encoding="utf-8"?><!--
  ~ Copyright (c) 2022 Proton AG
  ~
  ~ This file is part of Proton Mail.
  ~
  ~ Proton Mail is free software: you can redistribute it and/or modify
  ~ it under the terms of the GNU General Public License as published by
  ~ the Free Software Foundation, either version 3 of the License, or
  ~ (at your option) any later version.
  ~
  ~ Proton Mail is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  ~ GNU General Public License for more details.
  ~
  ~ You should have received a copy of the GNU General Public License
  ~ along with Proton Mail. If not, see https://www.gnu.org/licenses/.
  -->

<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="?selectableItemBackground"
    android:clickable="true"
    android:focusable="true"
    android:paddingVertical="@dimen/padding_l">

    <ch.protonmail.android.views.ListItemThumbnail
        android:id="@+id/thumbnail_view_contacts_list"
        android:layout_width="@dimen/padding_l"
        android:layout_height="@dimen/padding_l"
        android:clickable="true"
        android:focusable="true"
        android:layout_marginStart="@dimen/padding_l"
        app:circleSize="@dimen/padding_3xl"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <TextView
        android:id="@+id/text_view_contact_name"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:ellipsize="end"
        android:maxLines="1"
        android:paddingHorizontal="@dimen/padding_l"
        android:textAppearance="@style/Proton.Text.Default"
        app:layout_constraintEnd_toStartOf="@+id/image_view_contact_item_send_button"
        app:layout_constraintStart_toEndOf="@+id/thumbnail_view_contacts_list"
        app:layout_constraintTop_toTopOf="parent"
        tools:text="@tools:sample/lorem/random" />

    <TextView
        android:id="@+id/text_view_contact_subtitle"
        style="@style/Proton.Text.DefaultSmall.Weak"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:ellipsize="end"
        android:maxLines="1"
        android:paddingHorizontal="@dimen/padding_l"
        android:visibility="gone"
        app:layout_constraintEnd_toStartOf="@+id/image_view_contact_item_send_button"
        app:layout_constraintStart_toEndOf="@+id/thumbnail_view_contacts_list"
        app:layout_constraintTop_toBottomOf="@+id/text_view_contact_name"
        tools:text="@tools:sample/lorem/random"
        tools:visibility="visible" />

    <ImageView
        android:id="@+id/image_view_contact_item_send_button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="?selectableItemBackgroundBorderless"
        android:clickable="true"
        android:contentDescription="@string/send"
        android:focusable="true"
        android:paddingHorizontal="@dimen/padding_l"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:srcCompat="@drawable/ic_proton_paper_plane"
        tools:visibility="visible" />


</androidx.constraintlayout.widget.ConstraintLayout>
