<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout 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"
    tools:context="com.deniscerri.ytdlnis.ui.more.TerminalActivity">

    <FrameLayout
        android:id="@+id/custom_command_frame_layout"
        android:layout_width="match_parent"
        app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
        android:layout_height="match_parent"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_margin="10dp"
            android:layout_height="wrap_content"
            android:orientation="vertical">

            <EditText
                android:id="@+id/command_edittext"
                android:background="@android:color/transparent"
                android:text="yt-dlp "
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:inputType="textMultiLine"
                android:gravity="start"
                android:maxLines="10" />

            <ScrollView
                android:id="@+id/custom_command_scrollview"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:clipToPadding="false"
                android:paddingBottom="150dp"
                >

                <TextView
                    android:id="@+id/custom_command_output"
                    android:layout_width="match_parent"
                    android:textIsSelectable="true"
                    android:fontFamily="monospace"
                    android:gravity="bottom"
                    android:layout_height="wrap_content" />

            </ScrollView>

        </LinearLayout>

    </FrameLayout>


    <com.google.android.material.appbar.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:liftOnScroll="true"
        android:background="@android:color/transparent"
        android:fitsSystemWindows="true">

        <com.google.android.material.appbar.MaterialToolbar
            android:id="@+id/custom_command_toolbar"
            android:elevation="0dp"
            app:title="@string/terminal"
            android:layout_width="match_parent"
            app:navigationIcon="@drawable/ic_back"
            android:layout_height="match_parent"/>


    </com.google.android.material.appbar.AppBarLayout>

    <com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
        android:id="@+id/command_fab"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom|end"
        android:layout_margin="16dp"
        android:text="@string/run_command"
        app:icon="@drawable/ic_baseline_keyboard_arrow_right_24"
        />

    <com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
        android:id="@+id/cancel_command_fab"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom|end"
        android:layout_margin="16dp"
        android:text="@string/cancel_download"
        android:visibility="gone"
        app:icon="@drawable/ic_delete_all"
        />

</androidx.coordinatorlayout.widget.CoordinatorLayout>