<?xml version="1.0" encoding="utf-8"?>
<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="match_parent"
    android:paddingHorizontal="30dp"
    tools:context=".view.HomeFragment">

    <FrameLayout
        android:id="@+id/header"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="40dp"
        android:orientation="horizontal"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <TextView
            android:id="@+id/textViewTitle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/hello"
            android:textColor="@color/title"
            android:textSize="20sp"
            android:textStyle="bold" />

        <ImageButton
            android:id="@+id/buttonFavorite"
            android:layout_width="34dp"
            android:layout_height="34dp"
            android:layout_gravity="end"
            android:background="@android:color/transparent"
            android:scaleType="fitCenter"
            android:src="@drawable/icon_like"
            android:contentDescription="@string/imageNotFound" />

    </FrameLayout>


    <TextView
        android:id="@+id/textViewSubtitle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="5dp"
        android:fontFamily="@font/mulish_black"
        android:text="Welcome Back!"
        android:textColor="@color/title"
        android:textSize="28sp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/header" />

    <LinearLayout
        android:id="@+id/searchBarContainer"
        android:layout_width="0dp"
        android:layout_height="45dp"
        android:layout_marginTop="20dp"
        android:background="@drawable/background"
        android:gravity="center_vertical"
        android:orientation="horizontal"
        android:paddingHorizontal="16dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/textViewSubtitle">

        <ImageView
            android:layout_width="14dp"
            android:layout_height="14dp"
            android:contentDescription="search icon"
            android:src="@drawable/search" />

        <EditText
            android:id="@+id/searchBar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginStart="8dp"
            android:background="@android:color/transparent"
            android:drawablePadding="8dp"
            android:hint="Search for a league, team, etc."
            android:inputType="text"
            android:maxLines="1"
            android:textColorHint="#B0B0B0"
            android:textSize="15dp" />

    </LinearLayout>

    <TextView
        android:id="@+id/textViewRecentMatches"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="20dp"
        android:text="Recent Matches Day"
        android:textColor="@color/title"
        android:textSize="20dp"
        android:textStyle="bold"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/searchBarContainer" />

    <ImageButton
        android:id="@+id/restartMatches"
        android:layout_width="20dp"
        android:layout_height="20dp"
        android:layout_marginTop="20dp"
        android:background="@android:color/transparent"
        android:scaleType="fitCenter"
        android:src="@drawable/restart"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toBottomOf="@id/searchBarContainer" />

    <TextView
        android:id="@+id/textEmpty"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textColor="@color/title"
        android:textSize="20dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/textViewRecentMatches" />

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/listRecentsMatches"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="5dp"
        android:paddingBottom="200dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/textViewRecentMatches"
        tools:itemCount="10" />

</androidx.constraintlayout.widget.ConstraintLayout>