<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:orientation="horizontal"
    android:paddingHorizontal="@dimen/overscan_horizontal"
    android:paddingBottom="@dimen/overscan_vertical">

    <LinearLayout
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:orientation="vertical">

        <TextView
            android:id="@+id/stored_servers_title"
            style="@style/Widget.Jellyfin.Row.Header"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/saved_servers"
            android:visibility="gone"
            tools:visibility="visible" />

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/stored_servers"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
            tools:ignore="NestedWeights"
            tools:itemCount="3"
            tools:listitem="@layout/view_button_server" />

        <TextView
            android:id="@+id/welcome_title"
            style="@style/Widget.Jellyfin.Row.Header"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/welcome_title" />

        <TextView
            android:id="@+id/welcome_content"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            android:layout_marginBottom="8dp"
            android:text="@string/welcome_content" />

        <Button
            android:id="@+id/enter_server_address"
            style="@style/Button.Default"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="4dp"
            android:text="@string/connect_manually_by_address" />
    </LinearLayout>

    <Space
        android:layout_width="16dp"
        android:layout_height="match_parent" />

    <LinearLayout
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:orientation="vertical">

        <androidx.compose.ui.platform.ComposeView
            android:id="@+id/notifications"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:descendantFocusability="blocksDescendants"
            android:focusable="false" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal">

            <TextView
                android:id="@+id/discovery_title"
                style="@style/Widget.Jellyfin.Row.Header"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="@string/discovered_servers_title" />

            <ProgressBar
                android:id="@+id/discovery_progress_indicator"
                android:layout_width="18dp"
                android:layout_height="18dp"
                android:layout_gravity="end|center_vertical"
                android:layout_marginEnd="6dp" />
        </LinearLayout>

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/discovery_servers"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
            tools:itemCount="3"
            tools:listitem="@layout/view_button_server" />

        <TextView
            android:id="@+id/discovery_none_found"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_marginTop="32dp"
            android:layout_weight="1"
            android:gravity="top|center"
            android:text="@string/discovered_servers_empty"
            android:visibility="gone" />

        <TextView
            android:id="@+id/app_version"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="end"
            android:layout_marginTop="6dp"
            android:textColor="@color/lb_grey"
            tools:text="App version" />
    </LinearLayout>
</LinearLayout>
