<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <data>

        <variable
            name="showAdvice"
            type="Boolean" />


        <variable
            name="onCloseClickListener"
            type="android.view.View.OnClickListener" />

        <variable
            name="onSubmitClickListener"
            type="android.view.View.OnClickListener" />

        <variable
            name="onStarClickListener"
            type="android.view.View.OnClickListener" />
    </data>

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">


        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent">

            <View
                android:id="@+id/v_scoring_bg"
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:background="@drawable/bg_scoring_dialog"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintWidth_percent="0.8333333333333333" />

            <Space
                android:id="@id/space1"
                android:layout_width="match_parent"
                android:layout_height="0dp"
                app:layout_constraintDimensionRatio="360:64"
                app:layout_constraintTop_toTopOf="@id/v_scoring_bg" />


            <ImageView
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:layout_margin="16dp"
                android:onClick="@{onCloseClickListener}"
                android:src="@drawable/icon_recording_close"
                app:layout_constraintDimensionRatio="1:1"
                app:layout_constraintEnd_toEndOf="@id/v_scoring_bg"
                app:layout_constraintTop_toTopOf="@id/v_scoring_bg"
                app:layout_constraintWidth_percent="0.0666666666666667" />

            <ImageView
                android:id="@+id/iv_scoring_header_img"
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:src="@drawable/icon_scoring_header_img"
                app:layout_constraintDimensionRatio="1:1"
                app:layout_constraintEnd_toEndOf="@+id/v_scoring_bg"
                app:layout_constraintStart_toStartOf="@id/v_scoring_bg"
                app:layout_constraintTop_toBottomOf="@id/space1"
                app:layout_constraintWidth_percent="0.1888888888888889" />

            <Space
                android:id="@id/space2"
                android:layout_width="match_parent"
                android:layout_height="0dp"
                app:layout_constraintDimensionRatio="360:9"
                app:layout_constraintTop_toBottomOf="@id/iv_scoring_header_img" />

            <Space
                android:id="@id/space3"
                android:layout_width="match_parent"
                android:layout_height="0dp"
                app:layout_constraintDimensionRatio="360:24"
                app:layout_constraintTop_toBottomOf="@id/space2" />

            <TextView
                android:id="@+id/tv_scoring_title"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/scoring_title"
                android:textColor="@color/white"
                android:textSize="20sp"
                android:textStyle="bold"
                app:layout_constraintEnd_toEndOf="@id/v_scoring_bg"
                app:layout_constraintStart_toStartOf="@id/v_scoring_bg"
                app:layout_constraintTop_toBottomOf="@+id/space3" />

            <Space
                android:id="@id/space4"
                android:layout_width="match_parent"
                android:layout_height="0dp"
                app:layout_constraintDimensionRatio="360:12"
                app:layout_constraintTop_toBottomOf="@+id/tv_scoring_title" />

            <TextView
                android:id="@+id/tv_scoring_content"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:gravity="center"
                android:text="@string/scoring_content"
                android:textColor="@color/white60"
                android:textSize="14sp"
                app:layout_constraintEnd_toEndOf="@+id/v_scoring_bg"
                app:layout_constraintStart_toStartOf="@+id/v_scoring_bg"
                app:layout_constraintTop_toBottomOf="@+id/space4"
                app:layout_constraintWidth_percent="0.7416666666666667" />

            <Space
                android:id="@id/space5"
                android:layout_width="match_parent"
                android:layout_height="0dp"
                app:layout_constraintDimensionRatio="360:20"
                app:layout_constraintTop_toBottomOf="@+id/tv_scoring_content" />

            <com.airbnb.lottie.LottieAnimationView
                android:id="@+id/scoring_star_1"
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:onClickListener="@{onStarClickListener}"
                app:layout_constraintDimensionRatio="1:1"
                app:layout_constraintHorizontal_chainStyle="packed"
                app:layout_constraintLeft_toLeftOf="@id/v_scoring_bg"
                app:layout_constraintRight_toLeftOf="@id/scoring_star_2"
                app:layout_constraintTop_toBottomOf="@+id/space5"
                app:layout_constraintWidth_percent="0.1111111111111111"
                app:lottie_fileName="anim/anim_scoring_normal.zip" />

            <com.airbnb.lottie.LottieAnimationView
                android:id="@+id/scoring_star_2"
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:layout_marginStart="8dp"
                android:onClickListener="@{onStarClickListener}"
                app:layout_constraintDimensionRatio="1:1"
                app:layout_constraintLeft_toRightOf="@id/scoring_star_1"
                app:layout_constraintRight_toLeftOf="@id/scoring_star_3"
                app:layout_constraintTop_toTopOf="@+id/scoring_star_1"
                app:layout_constraintWidth_percent="0.1111111111111111"
                app:lottie_fileName="anim/anim_scoring_normal.zip" />

            <com.airbnb.lottie.LottieAnimationView
                android:id="@+id/scoring_star_3"
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:layout_marginStart="8dp"
                android:onClickListener="@{onStarClickListener}"
                app:layout_constraintDimensionRatio="1:1"
                app:layout_constraintLeft_toRightOf="@id/scoring_star_2"
                app:layout_constraintRight_toLeftOf="@id/scoring_star_4"
                app:layout_constraintTop_toTopOf="@+id/scoring_star_1"
                app:layout_constraintWidth_percent="0.1111111111111111"
                app:lottie_fileName="anim/anim_scoring_normal.zip" />

            <com.airbnb.lottie.LottieAnimationView
                android:id="@+id/scoring_star_4"
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:layout_marginStart="8dp"
                android:onClickListener="@{onStarClickListener}"
                app:layout_constraintDimensionRatio="1:1"
                app:layout_constraintLeft_toRightOf="@id/scoring_star_3"
                app:layout_constraintRight_toLeftOf="@id/scoring_star_5"
                app:layout_constraintTop_toTopOf="@+id/scoring_star_1"
                app:layout_constraintWidth_percent="0.1111111111111111"
                app:lottie_fileName="anim/anim_scoring_normal.zip" />

            <com.airbnb.lottie.LottieAnimationView
                android:id="@+id/scoring_star_5"
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:layout_marginStart="8dp"
                android:onClickListener="@{onStarClickListener}"
                app:layout_constraintDimensionRatio="1:1"
                app:layout_constraintLeft_toRightOf="@id/scoring_star_4"
                app:layout_constraintRight_toRightOf="@id/v_scoring_bg"
                app:layout_constraintTop_toTopOf="@+id/scoring_star_1"
                app:layout_constraintWidth_percent="0.1111111111111111"
                app:lottie_fileName="anim/anim_scoring_normal.zip" />


            <Space
                android:id="@+id/space6"
                android:layout_width="match_parent"
                android:layout_height="0dp"
                app:layout_constraintDimensionRatio="360:30"
                app:layout_constraintTop_toBottomOf="@+id/scoring_star_1" />


            <Space
                android:id="@+id/space7"
                android:layout_width="match_parent"
                android:layout_height="0dp"
                app:layout_constraintDimensionRatio="360:26"
                app:layout_constraintTop_toBottomOf="@+id/space6" />


            <com.atmob.voiceai.widget.IgnoreNoEnterActionEditText
                android:id="@+id/et_scoring_advice"
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:background="@drawable/bg_scoring_edit"
                android:gravity="start"
                android:hint="@string/scoring_advice_hint"
                android:maxLength="200"
                android:paddingHorizontal="8dp"
                android:paddingVertical="10dp"
                android:textColor="@color/white"
                android:textColorHint="@color/white20"
                android:textSize="14sp"
                app:layout_constraintDimensionRatio="266:120"
                app:layout_constraintEnd_toEndOf="@+id/v_scoring_bg"
                app:layout_constraintStart_toStartOf="@id/v_scoring_bg"
                app:layout_constraintTop_toBottomOf="@+id/space7"
                app:layout_constraintWidth_percent="0.7388888888888889" />

            <TextView
                android:id="@+id/tv_scoring_advice_count"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginEnd="12dp"
                android:layout_marginBottom="10dp"
                android:text="0/200"
                android:textColor="@color/white50"
                android:textSize="14sp"
                app:layout_constraintBottom_toBottomOf="@+id/et_scoring_advice"
                app:layout_constraintEnd_toEndOf="@+id/et_scoring_advice" />

            <Space
                android:id="@+id/space8"
                android:layout_width="match_parent"
                android:layout_height="0dp"
                app:layout_constraintDimensionRatio="360:31"
                app:layout_constraintTop_toBottomOf="@+id/et_scoring_advice" />


            <TextView
                android:id="@+id/tv_scoring_submit"
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:background="@drawable/bg_voice_ai_btn"
                android:gravity="center"
                android:text="@string/scoring_submit"
                android:textColor="@color/colorPrimary"
                android:textSize="15sp"
                android:onClick="@{onSubmitClickListener}"
                android:textStyle="bold"
                app:layout_constraintDimensionRatio="256:36"
                app:layout_constraintEnd_toEndOf="@+id/v_scoring_bg"
                app:layout_constraintStart_toStartOf="@+id/v_scoring_bg"
                app:layout_constraintTop_toBottomOf="@+id/space8"
                app:layout_constraintWidth_percent="0.7111111111111111" />

            <Space
                android:id="@+id/space9"
                android:layout_width="match_parent"
                android:layout_height="0dp"
                app:layout_constraintDimensionRatio="360:27"
                app:layout_constraintTop_toBottomOf="@+id/tv_scoring_submit" />


            <androidx.constraintlayout.widget.Group
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                app:constraint_referenced_ids="space2,et_scoring_advice,tv_scoring_advice_count,space8,tv_scoring_submit,space9"
                app:isGone="@{!showAdvice}" />

            <androidx.constraintlayout.widget.Group
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                app:constraint_referenced_ids="space6"
                app:isGone="@{showAdvice}" />

        </androidx.constraintlayout.widget.ConstraintLayout>


    </androidx.constraintlayout.widget.ConstraintLayout>
</layout>