<?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:background="@color/black"
    tools:context=".MainActivity">

    <LinearLayout
        android:id="@+id/nav_panel"
        android:layout_width="180dp"
        android:layout_height="0dp"
        android:orientation="vertical"
        android:paddingStart="16dp"
        android:paddingTop="32dp"
        android:paddingEnd="16dp"
        android:paddingBottom="32dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <TextView
          android:id="@+id/app_brand"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="@string/app_name"
          android:textAllCaps="true"
          android:textColor="@color/white"
          android:textSize="20sp"
          android:textStyle="bold" />

        <TextView
            android:id="@+id/app_tagline"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="4dp"
            android:text="@string/home_tagline"
            android:textColor="@color/text_secondary"
            android:textSize="12sp" />

        <Button
            android:id="@+id/vpn_button"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="16dp"
            android:text="@string/vpn_connect"
            android:textAllCaps="false"
            android:textSize="12sp"
            android:background="@drawable/btn_vpn_selector"
            android:textColor="@color/white"
            android:elevation="2dp" />

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/section_list"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_marginTop="24dp"
            android:layout_weight="1"
            android:overScrollMode="never"
            tools:listitem="@layout/item_section" />
    </LinearLayout>

    <View
        android:id="@+id/divider"
        android:layout_width="1dp"
        android:layout_height="0dp"
        android:background="#33FFFFFF"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toEndOf="@id/nav_panel"
        app:layout_constraintTop_toTopOf="parent" />

    <LinearLayout
        android:id="@+id/content_panel"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:orientation="vertical"
        android:paddingStart="24dp"
        android:paddingTop="32dp"
        android:paddingEnd="24dp"
        android:paddingBottom="32dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@id/divider"
        app:layout_constraintTop_toTopOf="parent">

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

            <TextView
                android:id="@+id/content_title"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:textColor="@color/white"
                android:textSize="18sp"
                android:textStyle="bold"
                tools:text="Canales" />

            <Button
                android:id="@+id/refresh_button"
                android:layout_width="wrap_content"
                android:layout_height="36dp"
                android:text="@string/action_refresh"
                android:textAllCaps="false"
                android:textSize="12sp"
                android:visibility="gone"
                android:focusable="true"
                android:focusableInTouchMode="true"
                android:background="@drawable/btn_refresh_selector"
                android:textColor="@color/white"
                android:elevation="2dp" />

        </LinearLayout>

        <ProgressBar
            android:id="@+id/loading_indicator"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="16dp"
            android:visibility="gone" />

        <TextView
            android:id="@+id/message_view"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:textColor="@color/text_secondary"
            android:textSize="14sp"
            android:visibility="gone"
            tools:text="Mensaje" />

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/content_list"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_marginTop="16dp"
            android:layout_weight="1"
            android:overScrollMode="never"
            android:scrollbars="vertical"
            android:fadeScrollbars="false"
            android:scrollbarStyle="insideInset"
            android:scrollbarThumbVertical="@drawable/scrollbar_vertical"
            android:scrollbarTrackVertical="@color/scrollbar_track"
            android:scrollbarSize="12dp"
            android:scrollbarAlwaysDrawVerticalTrack="true"
            android:scrollbarFadeDuration="0"
            android:nextFocusLeft="@id/section_list"
            tools:listitem="@layout/item_channel" />
    </LinearLayout>

</androidx.constraintlayout.widget.ConstraintLayout>
