<?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:id="@+id/info"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_marginHorizontal="24dp"
    android:layout_marginBottom="12dp">

    <TextView
        android:id="@+id/size_title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="8dp"
        android:text="@string/size"
        android:textAppearance="@style/TextAppearance.Material3.BodyMedium"
        android:visibility="gone"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <TextView
        android:id="@+id/size"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:textAppearance="@style/TextAppearance.Material3.BodyMedium"
        android:visibility="gone"
        app:layout_constraintBaseline_toBaselineOf="@id/size_title"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="@id/titles_barrier"
        tools:text="42.42 TB" />

    <TextView
        android:id="@+id/video_title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="12dp"
        android:text="@string/video"
        android:textAppearance="@style/TextAppearance.Material3.BodyMedium"
        android:visibility="gone"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/size" />

    <TextView
        android:id="@+id/video"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:textAppearance="@style/TextAppearance.Material3.BodyMedium"
        android:visibility="gone"
        app:layout_constraintBaseline_toBaselineOf="@id/video_title"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="@id/titles_barrier"
        tools:text="4K HEVC HDR" />

    <TextView
        android:id="@+id/audio_title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="12dp"
        android:text="@string/audio"
        android:textAppearance="@style/TextAppearance.Material3.BodyMedium"
        android:visibility="gone"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/video"
        tools:visibility="visible" />

    <TextView
        android:id="@+id/audio"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:ellipsize="end"
        android:maxLines="3"
        android:textAppearance="@style/TextAppearance.Material3.BodyMedium"
        android:visibility="gone"
        app:layout_constraintBaseline_toBaselineOf="@id/audio_title"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="@id/titles_barrier"
        tools:text="AC-3 Eng 5.1, AC-3 iTA 5.1"
        tools:visibility="visible" />

    <TextView
        android:id="@+id/subtitles_title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="12dp"
        android:text="@string/subtitle"
        android:textAppearance="@style/TextAppearance.Material3.BodyMedium"
        android:visibility="gone"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/audio"
        tools:visibility="visible" />

    <TextView
        android:id="@+id/subtitles"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:ellipsize="end"
        android:maxLines="3"
        android:textAppearance="@style/TextAppearance.Material3.BodyMedium"
        android:visibility="gone"
        app:layout_constraintBaseline_toBaselineOf="@id/subtitles_title"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="@id/titles_barrier"
        tools:text="English - SUBRIP, SDH - English - SUBRIP"
        tools:visibility="visible" />

    <TextView
        android:id="@+id/description"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="12dp"
        android:textAppearance="@style/TextAppearance.Material3.BodyMedium"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/subtitles"
        tools:text="An angel falls. A warrior rises. When Alita awakens with no memory of who she is in a future world she does not recognize, she is taken in by Ido, a compassionate doctor who realizes that somewhere in this abandoned cyborg shell is the heart and soul of a young woman with an extraordinary past." />

    <TextView
        android:id="@+id/genres_title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="12dp"
        android:text="@string/genres"
        android:textAppearance="@style/TextAppearance.Material3.BodyMedium"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/description" />

    <TextView
        android:id="@+id/genres"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:textAppearance="@style/TextAppearance.Material3.BodyMedium"
        app:layout_constraintBaseline_toBaselineOf="@id/genres_title"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="@id/titles_barrier"
        tools:text="Action, Science Fiction, Adventure" />

    <TextView
        android:id="@+id/director_title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="12dp"
        android:text="@string/director"
        android:textAppearance="@style/TextAppearance.Material3.BodyMedium"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/genres" />

    <TextView
        android:id="@+id/director"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:textAppearance="@style/TextAppearance.Material3.BodyMedium"
        app:layout_constraintBaseline_toBaselineOf="@id/director_title"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="@id/titles_barrier"
        tools:text="Robert Rodriguez" />

    <TextView
        android:id="@+id/writers_title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="12dp"
        android:text="@string/writers"
        android:textAppearance="@style/TextAppearance.Material3.BodyMedium"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/director" />

    <TextView
        android:id="@+id/writers"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:textAppearance="@style/TextAppearance.Material3.BodyMedium"
        app:layout_constraintBaseline_toBaselineOf="@id/writers_title"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="@id/titles_barrier"
        tools:text="James Cameron, Laeta Kalogridis, Yukito Kishiro" />

    <androidx.constraintlayout.widget.Barrier
        android:id="@+id/titles_barrier"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:barrierDirection="end"
        app:barrierMargin="8dp"
        app:constraint_referenced_ids="video_title,audio_title,subtitles_title,genres_title,director_title,writers_title" />

    <androidx.constraintlayout.widget.Group
        android:id="@+id/size_group"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:visibility="gone"
        app:constraint_referenced_ids="size_title, size"
        tools:visibility="visible" />

    <androidx.constraintlayout.widget.Group
        android:id="@+id/video_group"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:visibility="gone"
        app:constraint_referenced_ids="video_title, video"
        tools:visibility="visible" />

    <androidx.constraintlayout.widget.Group
        android:id="@+id/audio_group"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:visibility="gone"
        app:constraint_referenced_ids="audio_title, audio"
        tools:visibility="visible" />

    <androidx.constraintlayout.widget.Group
        android:id="@+id/subtitles_group"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:visibility="gone"
        app:constraint_referenced_ids="subtitles_title, subtitles"
        tools:visibility="visible" />

    <androidx.constraintlayout.widget.Group
        android:id="@+id/genres_group"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:visibility="visible"
        app:constraint_referenced_ids="genres_title, genres" />

    <androidx.constraintlayout.widget.Group
        android:id="@+id/director_group"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:visibility="gone"
        app:constraint_referenced_ids="director_title, director" />

    <androidx.constraintlayout.widget.Group
        android:id="@+id/writers_group"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:visibility="visible"
        app:constraint_referenced_ids="writers_title, writers" />

</androidx.constraintlayout.widget.ConstraintLayout>
