<?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="wechatViewModel"
            type="com.datarecovery.master.module.wxrecover.WeChatViewModel" />

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

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


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

        <Space
            android:id="@+id/space_status_bar"
            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:22"
            app:layout_constraintTop_toBottomOf="@+id/space_status_bar" />

        <ImageView
            android:id="@+id/iv_back"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:layout_marginStart="@dimen/app_common_page_horizontal_padding"
            android:background="?android:attr/selectableItemBackgroundBorderless"
            android:onClick="@{()->wechatViewModel.onBackClick()}"
            android:src="@drawable/icon_back"
            app:layout_constraintDimensionRatio="1:1"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/space1"
            app:layout_constraintWidth_percent="0.0666666666666667" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/wx_recover_title"
            android:textColor="#202020"
            android:textSize="17sp"
            app:layout_constraintBottom_toBottomOf="@+id/iv_back"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="@+id/iv_back" />

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

        <ImageView
            android:id="@+id/iv_wx_recover_pay_success"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:src="@drawable/icon_wx_recover_pay_success"
            app:layout_constraintDimensionRatio="110:60"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/space2"
            app:layout_constraintWidth_percent="0.3055555555555556" />

        <TextView
            android:id="@+id/tv_wx_recover_pay_success"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="6dp"
            android:text="@string/wx_recover_pay_success"
            android:textColor="#202020"
            android:textSize="20sp"
            android:textStyle="bold"
            app:layout_constraintEnd_toEndOf="@+id/iv_wx_recover_pay_success"
            app:layout_constraintStart_toStartOf="@+id/iv_wx_recover_pay_success"
            app:layout_constraintTop_toBottomOf="@+id/iv_wx_recover_pay_success" />

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

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

        <View
            android:id="@+id/v_order_bg"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_marginHorizontal="@dimen/app_common_page_horizontal_padding"
            android:background="@drawable/bg_wx_recover"
            app:layout_constraintBottom_toBottomOf="@+id/space7"
            app:layout_constraintTop_toTopOf="@id/space4" />

        <TextView
            android:id="@+id/tv_order_detail"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="12dp"
            android:text="@string/wx_recover_order_detail"
            android:textColor="#202020"
            android:textSize="14sp"
            android:textStyle="bold"
            app:layout_constraintStart_toStartOf="@+id/v_order_bg"
            app:layout_constraintTop_toBottomOf="@+id/space4" />

        <View
            android:id="@+id/v_order_line"
            android:layout_width="0dp"
            android:layout_height="1dp"
            android:layout_marginTop="4dp"
            android:background="#F5F5F5"
            app:layout_constraintStart_toStartOf="@id/tv_order_detail"
            app:layout_constraintTop_toBottomOf="@+id/tv_order_detail"
            app:layout_constraintWidth_percent="0.8222222222222222" />

        <TextView
            android:id="@+id/tv_order_no"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="9dp"
            android:text="@string/wx_recover_order_no"
            android:textColor="#404040"
            android:textSize="14sp"
            app:layout_constraintLeft_toLeftOf="@+id/tv_order_detail"
            app:layout_constraintTop_toBottomOf="@+id/v_order_line" />

        <TextView
            android:onClick="@{()-> wechatViewModel.onCopyOrderNoClick()}"
            android:id="@+id/tv_order_no_copy"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginEnd="12dp"
            android:background="@drawable/bg_wx_recover_copy"
            android:paddingHorizontal="8dp"
            android:paddingVertical="1dp"
            android:text="@string/wx_recover_copy"
            android:textColor="#404040"
            android:textSize="12sp"
            app:layout_constraintBottom_toBottomOf="@+id/tv_order_no"
            app:layout_constraintEnd_toEndOf="@id/v_order_bg"
            app:layout_constraintTop_toTopOf="@+id/tv_order_no" />


        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginEnd="6dp"
            android:text="@{wechatViewModel.findOrderDetail.outTradeNo}"
            android:textColor="#A7A7A7"
            android:textSize="14sp"
            app:layout_constraintBottom_toBottomOf="@+id/tv_order_no"
            app:layout_constraintEnd_toStartOf="@+id/tv_order_no_copy"
            app:layout_constraintTop_toTopOf="@id/tv_order_no"
            tools:text="1541988181058187" />

        <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_order_no" />

        <TextView
            android:id="@+id/tv_auth_code"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="9dp"
            android:text="@string/wx_recover_auth_code"
            android:textColor="#404040"
            android:textSize="14sp"
            app:layout_constraintLeft_toLeftOf="@+id/tv_order_detail"
            app:layout_constraintTop_toBottomOf="@+id/space5" />

        <TextView
            android:onClick="@{()-> wechatViewModel.onCopyAuthCodeClick()}"
            android:id="@+id/tv_auth_code_copy"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginEnd="12dp"
            android:background="@drawable/bg_wx_recover_copy"
            android:paddingHorizontal="8dp"
            android:paddingVertical="1dp"
            android:text="@string/wx_recover_copy"
            android:textColor="#404040"
            android:textSize="12sp"
            app:layout_constraintBottom_toBottomOf="@+id/tv_auth_code"
            app:layout_constraintEnd_toEndOf="@id/v_order_bg"
            app:layout_constraintTop_toTopOf="@+id/tv_auth_code" />


        <TextView
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="@dimen/app_common_page_horizontal_padding"
            android:layout_marginEnd="6dp"
            android:gravity="center_vertical|right"
            android:text="@{wechatViewModel.findOrderDetail.authCode}"
            android:textColor="#A7A7A7"
            android:textSize="14sp"
            app:layout_constraintBottom_toBottomOf="@+id/tv_auth_code"
            app:layout_constraintEnd_toStartOf="@+id/tv_order_no_copy"
            app:layout_constraintStart_toEndOf="@+id/tv_auth_code"
            app:layout_constraintTop_toTopOf="@id/tv_auth_code"
            tools:text="15419881810" />


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


        <LinearLayout
            android:id="@+id/ll_wx_recover_desc"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginHorizontal="12dp"
            android:background="@drawable/bg_wx_recover_desc"
            android:orientation="vertical"
            android:padding="12dp"
            app:layout_constraintEnd_toEndOf="@+id/v_order_bg"
            app:layout_constraintStart_toStartOf="@+id/v_order_bg"
            app:layout_constraintTop_toBottomOf="@+id/space6">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/wx_recover_tutorial"
                android:textColor="#404040"
                android:textSize="12sp"
                android:textStyle="bold" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="6dp"
                android:text="@string/wx_recover_tutorial_content" />
        </LinearLayout>

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


        <View
            android:id="@+id/v_bottom_bg"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:background="@color/white"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintDimensionRatio="360:72" />

        <TextView
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:background="@drawable/bg_common_btn"
            android:gravity="center"
            android:onClick="@{()-> wechatViewModel.onCopyLinkClick()}"
            android:text="@string/wx_recover_copy_link"
            android:textColor="@color/white"
            android:textSize="16sp"
            android:textStyle="bold"
            app:layout_constraintBottom_toBottomOf="@+id/v_bottom_bg"
            app:layout_constraintDimensionRatio="328:44"
            app:layout_constraintEnd_toEndOf="@+id/v_bottom_bg"
            app:layout_constraintStart_toStartOf="@+id/v_bottom_bg"
            app:layout_constraintTop_toTopOf="@+id/v_bottom_bg"
            app:layout_constraintWidth_percent="0.9111111111111111" />


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