<?xml version="1.0" encoding="utf-8"?>
<!--
  TimeLimit Copyright <C> 2019 - 2020 Jonas Lochmann
  This program 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 version 3 of the License.

  This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
-->
<layout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools">
    <data>
        <variable
            name="label"
            type="String" />

        <variable
            name="wide"
            type="boolean" />

        <import type="android.view.View" />
    </data>

    <LinearLayout
        android:paddingStart="?android:attr/listPreferredItemPaddingStart"
        android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
        android:background="?selectableItemBackground"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <View
            android:visibility="@{wide ? View.VISIBLE : View.GONE}"
            android:layout_width="8dp"
            android:layout_height="0px" />

        <ImageView
            android:tint="?colorOnBackground"
            android:layout_gravity="center_vertical"
            android:src="@drawable/ic_add_black_24dp"
            android:layout_width="32dp"
            android:layout_height="32dp" />

        <View
            android:visibility="@{wide ? View.VISIBLE : View.GONE}"
            android:layout_width="8dp"
            android:layout_height="0px" />

        <View
            android:layout_width="8dp"
            android:layout_height="0dp" />

        <TextView
            android:text="@{label}"
            tools:text="@string/add_device"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:textAppearance="?android:attr/textAppearanceListItemSmall"
            android:gravity="center_vertical"
            android:minHeight="?android:attr/listPreferredItemHeightSmall" />

    </LinearLayout>
</layout>
