<?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"
    xmlns:tools="http://schemas.android.com/tools">

    <data>

        <variable
            name="cloneVoiceViewModel"
            type="com.atmob.voiceai.module.clonevoice.CloneVoiceViewModel" />


        <import type="com.atmob.common.ui.SizeUtil" />
    </data>

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


        <androidx.core.widget.NestedScrollView
            android:id="@+id/scroll_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

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

                <Space
                    android:id="@+id/space_status"
                    android:layout_width="match_parent"
                    android:layout_height="@{SizeUtil.getStatusBarHeight(), default=@dimen/app_status_bar_height}"
                    app:layout_constraintTop_toTopOf="parent" />

                <Space
                    android:id="@+id/space1"
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    app:layout_constraintDimensionRatio="360:50"
                    app:layout_constraintTop_toBottomOf="@id/space_status" />

                <ImageView
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:src="@drawable/bg_clone_voice_head_background"
                    app:layout_constraintDimensionRatio="1080:620"
                    app:layout_constraintTop_toTopOf="parent" />

                <ImageView
                    android:id="@+id/iv_logo"
                    android:layout_width="0dp"
                    android:layout_height="0dp"
                    android:src="@drawable/icon_clone_voice_logo"
                    app:layout_constraintDimensionRatio="216:203"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/space1"
                    app:layout_constraintWidth_percent="0.1833333333333333" />

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

                <TextView
                    android:id="@+id/tv_clone_tip"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="@dimen/clone_voice_padding"
                    android:text="@{cloneVoiceViewModel.cloneTip}"
                    android:textColor="@color/white"
                    android:textSize="26sp"
                    android:textStyle="bold"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/space2"
                    tools:text="CREATE YOUR OWN \nAI VOICE" />

                <TextView
                    android:id="@+id/tv_clone_hint"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginHorizontal="@dimen/clone_voice_padding"
                    android:layout_marginTop="12dp"
                    android:text="@string/clone_voice_hint"
                    android:textColor="@color/white80"
                    android:textSize="14sp"
                    app:layout_constraintTop_toBottomOf="@+id/tv_clone_tip" />


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

                <TextView
                    android:id="@+id/tv_clone_hint2"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginHorizontal="@dimen/clone_voice_padding"
                    android:text="@string/clone_voice_hint2"
                    android:textColor="@color/white80"
                    android:textSize="14sp"
                    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_clone_hint2" />


            </androidx.constraintlayout.widget.ConstraintLayout>

        </androidx.core.widget.NestedScrollView>

        <View
            android:id="@+id/v_status_bar"
            android:layout_width="match_parent"
            android:layout_height="@{SizeUtil.getStatusBarHeight(), default=@dimen/app_status_bar_height}"
            android:alpha="0"
            android:background="@color/colorPrimary"
            app:layout_constraintTop_toTopOf="parent" />


        <View
            android:id="@+id/v_menu"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:alpha="0"
            android:background="@color/colorPrimary"
            app:layout_constraintDimensionRatio="360:65"
            app:layout_constraintTop_toBottomOf="@+id/v_status_bar" />


        <View
            android:id="@+id/v_vip_bg"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:layout_marginStart="@dimen/app_common_page_horizontal_padding"
            android:background="@drawable/bg_voice_ai_vip"
            android:onClick="@{()-> cloneVoiceViewModel.onGoSubscriptionClick()}"
            app:layout_constraintBottom_toBottomOf="@+id/v_menu"
            app:layout_constraintDimensionRatio="58:28"
            app:layout_constraintStart_toStartOf="@+id/v_menu"
            app:layout_constraintTop_toTopOf="@+id/v_menu"
            app:layout_constraintWidth_percent="0.1611111111111111" />


        <ImageView
            android:id="@+id/iv_vip"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:src="@drawable/icon_vip"
            app:layout_constraintBottom_toBottomOf="@+id/v_vip_bg"
            app:layout_constraintDimensionRatio="1:1"
            app:layout_constraintHorizontal_chainStyle="packed"
            app:layout_constraintLeft_toLeftOf="@+id/v_vip_bg"
            app:layout_constraintRight_toLeftOf="@+id/tv_vip_title"
            app:layout_constraintTop_toTopOf="@+id/v_vip_bg"
            app:layout_constraintWidth_percent="0.0444444444444444" />

        <TextView
            android:id="@+id/tv_vip_title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="4dp"
            android:text="@string/voice_pro"
            android:textColor="@color/colorPrimaryVariant"
            android:textSize="14dp"
            app:layout_constraintBottom_toBottomOf="@+id/v_vip_bg"
            app:layout_constraintLeft_toRightOf="@+id/iv_vip"
            app:layout_constraintRight_toRightOf="@+id/v_vip_bg"
            app:layout_constraintTop_toTopOf="@+id/v_vip_bg" />

        <ImageView
            android:id="@+id/iv_setting"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:layout_marginEnd="16dp"
            android:onClick="@{()->cloneVoiceViewModel.onSettingClick()}"
            android:src="@drawable/icon_clone_setting"
            app:layout_constraintBottom_toBottomOf="@+id/v_menu"
            app:layout_constraintDimensionRatio="1:1"
            app:layout_constraintEnd_toEndOf="@+id/v_menu"
            app:layout_constraintTop_toTopOf="@+id/v_menu"
            app:layout_constraintWidth_percent="0.0888888888888889" />

        <androidx.constraintlayout.widget.Group
            isGone="@{cloneVoiceViewModel.isMember}"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:constraint_referenced_ids="v_vip_bg,iv_vip,tv_vip_title" />


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