<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat 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:background="@color/color_black"
    android:orientation="vertical"
    tools:context=".screen.register.RegisterActivity">

    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <androidx.cardview.widget.CardView
            android:id="@+id/backgroundCard"
            android:layout_width="match_parent"
            android:layout_height="200dp"
            app:cardBackgroundColor="@color/cardview_dark_background"
            app:cardElevation="0dp" />

        <ImageView
            android:id="@+id/backgroundImage"
            android:layout_width="match_parent"
            android:layout_height="200dp"
            android:src="@drawable/default_background" />

        <ImageView
            android:id="@+id/profileImage"
            android:layout_width="100dp"
            android:layout_height="100dp"
            android:layout_gravity="center_horizontal"
            android:layout_marginTop="150dp"
            android:background="@drawable/bg_circle_black"
            android:padding="15dp"
            android:src="@drawable/ic_upload_profile" />
    </FrameLayout>

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:padding="15dp">

        <com.google.android.material.textfield.TextInputLayout
            android:id="@+id/til_firstname"
            style="@style/BoxInputLayout"
            android:layout_width="match_parent"
            android:layout_height="48dp"
            android:layout_marginBottom="1dp"
            app:endIconMode="clear_text"
            app:hintEnabled="false">

            <androidx.appcompat.widget.AppCompatEditText
                android:id="@+id/et_firstname"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@color/color_white"
                android:hint="@string/hint_firstname"
                android:inputType="text"
                android:maxLength="50"
                android:padding="0dp" />
        </com.google.android.material.textfield.TextInputLayout>

        <com.google.android.material.textfield.TextInputLayout
            android:id="@+id/til_lastname"
            style="@style/BoxInputLayout"
            android:layout_width="match_parent"
            android:layout_height="48dp"
            android:layout_below="@id/til_firstname"
            android:layout_marginBottom="1dp"
            app:endIconMode="clear_text"
            app:hintEnabled="false">

            <androidx.appcompat.widget.AppCompatEditText
                android:id="@+id/et_lastname"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@color/color_white"
                android:hint="@string/hint_lastname"
                android:inputType="text"
                android:maxLength="50"
                android:padding="0dp" />
        </com.google.android.material.textfield.TextInputLayout>

        <androidx.appcompat.widget.AppCompatSpinner
            android:id="@+id/et_gender"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@id/til_lastname"
            android:layout_marginBottom="1dp"
            android:background="@color/color_white"
            android:hint="@string/hint_lastname"
            android:inputType="text"
            android:maxLength="50"
            android:paddingTop="10dp"
            android:paddingBottom="10dp" />

        <LinearLayout
            android:id="@+id/gender_layout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@id/et_gender"
            android:layout_marginBottom="1dp"
            android:background="@color/color_gray_300"
            android:orientation="vertical">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <RadioGroup
                    android:id="@+id/radioGroup"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal">

                    <RadioButton
                        android:id="@+id/radioButtonEmail"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:checked="true"
                        android:text="Email" />

                    <RadioButton
                        android:id="@+id/radioButtonPhone"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="Phone Number" />
                </RadioGroup>
            </LinearLayout>

            <com.google.android.material.textfield.TextInputLayout
                android:id="@+id/til_email"
                style="@style/BoxInputLayout"
                android:layout_width="match_parent"
                android:layout_height="48dp"
                app:endIconMode="clear_text"
                app:hintEnabled="false">

                <androidx.appcompat.widget.AppCompatEditText
                    android:id="@+id/et_email"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:background="@color/color_white"
                    android:hint="@string/hint_email"
                    android:inputType="text"
                    android:maxLength="50"
                    android:padding="0dp" />
            </com.google.android.material.textfield.TextInputLayout>

            <com.google.android.material.textfield.TextInputLayout
                android:id="@+id/til_phone"
                style="@style/BoxInputLayout"
                android:layout_width="match_parent"
                android:layout_height="48dp"
                android:visibility="gone"
                app:endIconMode="clear_text"
                app:hintEnabled="false">

                <androidx.appcompat.widget.AppCompatEditText
                    android:id="@+id/et_phone"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:background="@color/color_white"
                    android:hint="@string/hint_phone"
                    android:inputType="text"
                    android:maxLength="50"
                    android:padding="0dp" />
            </com.google.android.material.textfield.TextInputLayout>
        </LinearLayout>

        <com.google.android.material.textfield.TextInputLayout
            android:id="@+id/til_password"
            style="@style/BoxInputLayout"
            android:layout_width="match_parent"
            android:layout_height="48dp"
            android:layout_below="@id/gender_layout"
            android:layout_marginBottom="1dp"
            app:endIconMode="clear_text"
            app:hintEnabled="false">

            <androidx.appcompat.widget.AppCompatEditText
                android:id="@+id/et_password"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@color/color_white"
                android:hint="@string/hint_password"
                android:inputType="text"
                android:maxLength="50"
                android:padding="0dp" />
        </com.google.android.material.textfield.TextInputLayout>

        <com.google.android.material.textfield.TextInputLayout
            android:id="@+id/til_confirm_password"
            style="@style/BoxInputLayout"
            android:layout_width="match_parent"
            android:layout_height="48dp"
            android:layout_below="@id/til_password"
            android:layout_marginBottom="1dp"
            app:endIconMode="clear_text"
            app:hintEnabled="false">

            <androidx.appcompat.widget.AppCompatEditText
                android:id="@+id/et_confirm_password"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@color/color_white"
                android:hint="@string/hint_confirm_password"
                android:inputType="text"
                android:maxLength="50"
                android:padding="0dp" />
        </com.google.android.material.textfield.TextInputLayout>

        <TextView
            android:id="@+id/tv_agreement"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@id/til_confirm_password"
            android:text="@string/agreement_hint"
            android:textColor="@color/color_white"
            android:textSize="12sp" />

        <com.google.android.material.button.MaterialButton
            android:id="@+id/registerButton"
            android:layout_width="match_parent"
            android:layout_height="58dp"
            android:layout_below="@id/tv_agreement"
            android:layout_gravity="center"
            android:layout_marginTop="8dp"
            android:backgroundTint="@color/color_blue_600"
            android:gravity="center"
            android:text="Sign Up"
            android:textColor="@color/color_white"
            app:cornerRadius="0dp" />

        <com.google.android.material.button.MaterialButton
            android:id="@+id/loginButton"
            android:layout_width="match_parent"
            android:layout_height="58dp"
            android:layout_alignParentBottom="true"
            android:layout_gravity="center|bottom"
            android:backgroundTint="@color/color_blue_600"
            android:gravity="center"
            android:text="Login"
            android:textColor="@color/color_white"
            app:cornerRadius="0dp" />
    </RelativeLayout>

</androidx.appcompat.widget.LinearLayoutCompat>