<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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="vertical"
    android:fitsSystemWindows="false"
    android:background="@drawable/bottom_menu_border"
    android:id="@+id/root"
    android:clickable="true">

    <LinearLayout
        android:id="@+id/layout_top"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="10dp"
            android:layout_marginLeft="14dp"
            android:layout_marginRight="14dp"
            android:layout_marginTop="16dp">

            <LinearLayout
                android:id="@+id/layout_channel_button"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintRight_toLeftOf="@id/button_subscribe">

                <com.futo.platformplayer.views.others.CreatorThumbnail
                    android:id="@+id/creator_thumbnail"
                    android:layout_width="27dp"
                    android:layout_height="27dp"
                    android:contentDescription="@string/cd_creator_thumbnail" />
                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:layout_marginStart="6dp"
                    android:orientation="vertical">
                    <TextView
                        android:id="@+id/text_channel_name"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:textColor="@color/white"
                        android:layout_gravity="center"
                        android:layout_marginTop="-4dp"
                        android:ellipsize="end"
                        android:maxLines="1"
                        tools:text="Channel Name" />
                    <TextView
                        android:id="@+id/text_channel_meta"
                        android:layout_width="match_parent"
                        android:layout_weight="1"
                        android:layout_height="wrap_content"
                        android:textColor="#ACACAC"
                        android:textSize="9sp"
                        android:layout_gravity="center"
                        android:ellipsize="end"
                        android:maxLines="1"
                        tools:text="" />

                </LinearLayout>
            </LinearLayout>

            <com.futo.platformplayer.views.subscriptions.SubscribeButton
                android:id="@+id/button_subscribe"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="10dp"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintRight_toRightOf="parent" />
        </androidx.constraintlayout.widget.ConstraintLayout>

        <TextView
            android:id="@+id/text_title"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            tools:text="24 Things I Wish I Had Done Sooner (or my biggest regrets)"
            android:fontFamily="@font/inter_medium"
            android:textColor="@color/white"
            android:textSize="17sp"
            android:textIsSelectable="true"
            android:layout_marginTop="6dp"
            android:layout_marginLeft="14dp"
            android:layout_marginRight="14dp" />

        <FrameLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="14dp"
            android:layout_marginRight="14dp"
            android:layout_marginTop="4dp">

            <TextView
                android:id="@+id/text_meta"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                tools:text="51K views • 3 years ago"
                android:fontFamily="@font/inter_regular"
                android:textColor="@color/gray_ac"
                android:textSize="10dp"
                android:layout_gravity="center_vertical"/>

            <LinearLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:layout_gravity="end|center_vertical"
                android:gravity="center_vertical">

                <LinearLayout
                    android:id="@+id/layout_rating"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    android:gravity="center_vertical">

                    <ImageView
                        android:id="@+id/image_like_icon"
                        android:layout_width="18dp"
                        android:layout_height="18dp"
                        android:contentDescription="@string/cd_image_like_icon"
                        app:srcCompat="@drawable/ic_thumb_up" />

                    <TextView
                        android:id="@+id/text_likes"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:gravity="center_vertical"
                        android:layout_marginStart="8dp"
                        tools:text="500K"
                        android:textColor="@color/white"
                        android:textSize="10dp" />

                    <ImageView
                        android:id="@+id/image_dislike_icon"
                        android:layout_width="18dp"
                        android:layout_height="18dp"
                        android:contentDescription="@string/cd_image_dislike_icon"
                        android:layout_marginStart="8dp"
                        android:layout_marginTop="2dp"
                        app:srcCompat="@drawable/ic_thumb_down" />

                    <TextView
                        android:id="@+id/text_dislikes"
                        android:layout_width="wrap_content"
                        android:layout_height="18dp"
                        android:gravity="center_vertical"
                        android:layout_marginStart="8dp"
                        tools:text="500K"
                        android:textColor="@color/white"
                        android:textSize="10dp" />
                </LinearLayout>

                <com.futo.platformplayer.views.platform.PlatformIndicator
                    android:id="@+id/platform_indicator"
                    android:layout_width="25dp"
                    android:layout_height="25dp"
                    android:scaleType="centerInside"
                    tools:src="@drawable/ic_peertube"
                    android:layout_marginStart="8dp"
                    app:layout_constraintTop_toTopOf="@id/image_author_thumbnail"
                    app:layout_constraintRight_toRightOf="parent"
                    app:layout_constraintBottom_toBottomOf="@id/image_author_thumbnail" />
            </LinearLayout>
        </FrameLayout>

        <TextView
            android:id="@+id/text_summary"
            android:layout_width="wrap_content"
            android:layout_height="18dp"
            android:gravity="center_vertical"
            android:layout_marginStart="14dp"
            android:layout_marginEnd="5dp"
            android:textFontWeight="400"
            tools:text="This is the summary of the article"
            android:textColor="@color/white"
            android:textSize="13sp" />

        <LinearLayout
            android:id="@+id/container_segments"
            android:orientation="vertical"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />


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

            <com.futo.platformplayer.views.pills.PillRatingLikesDislikes
                android:id="@+id/rating"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="15dp" />

            <Space android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1" />

            <ImageButton
                android:id="@+id/button_share"
                android:layout_width="32dp"
                android:layout_height="32dp"
                android:contentDescription="@string/cd_button_share"
                android:background="@drawable/background_button_round"
                android:gravity="center"
                android:layout_marginStart="5dp"
                android:orientation="horizontal"
                app:srcCompat="@drawable/ic_share"
                app:tint="@color/white"
                android:padding="8dp"
                android:layout_marginEnd="15dp"
                app:layout_constraintRight_toRightOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                android:scaleType="fitCenter" />
        </LinearLayout>

        <LinearLayout
            android:id="@+id/layout_change_bottom_section"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:background="@drawable/background_videodetail_description"
            android:layout_marginTop="10dp"
            android:layout_marginBottom="10dp"
            android:layout_marginLeft="14dp"
            android:layout_marginRight="14dp">

            <Button
                android:id="@+id/button_polycentric"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:background="?android:attr/selectableItemBackground"
                android:text="Polycentric"
                android:textColor="#fff"
                android:textSize="10dp"
                android:lines="1"
                android:ellipsize="marquee"
                android:padding="10dp" />

            <Button
                android:id="@+id/button_platform"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:background="?android:attr/selectableItemBackground"
                android:text="Platform"
                android:textColor="#fff"
                android:textSize="10dp"
                android:lines="1"
                android:ellipsize="marquee"
                android:padding="10dp" />
        </LinearLayout>

        <com.futo.platformplayer.views.comments.AddCommentView
            android:id="@+id/add_comment_view"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:layout_marginBottom="12dp"
            android:layout_marginStart="28dp"
            android:layout_marginEnd="28dp" />
    </LinearLayout>

    <com.futo.platformplayer.views.segments.CommentsList
        android:id="@+id/comments_list"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <FrameLayout
        android:id="@+id/layout_loading_overlay"
        android:visibility="gone"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="#77000000"
        android:elevation="4dp">
        <ImageView
            android:id="@+id/image_loader"
            android:layout_width="80dp"
            android:layout_height="80dp"
            app:srcCompat="@drawable/ic_loader_animated"
            android:layout_gravity="top|center_horizontal"
            android:alpha="0.7"
            android:layout_marginTop="80dp"
            android:contentDescription="@string/loading" />
    </FrameLayout>

    <com.futo.platformplayer.views.overlays.RepliesOverlay
        android:id="@+id/replies_overlay"
        android:visibility="gone"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <FrameLayout
        android:id="@+id/overlay_container"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:visibility="gone"
        android:elevation="15dp">
    </FrameLayout>
</FrameLayout>