<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:background="@color/white"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <ImageView
        android:id="@+id/back_btn"
        android:layout_width="35sp"
        android:layout_height="35sp"
        android:layout_margin="15dp"
        android:contentDescription="@string/back_button"
        android:padding="5dp"
        android:paddingStart="-15dp"
        android:paddingEnd="0dp"
        android:src="@drawable/arrow_back" />

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginHorizontal="15dp"
        android:layout_marginBottom="5dp"
        android:fontFamily="@font/nunito_medium"
        android:text="@string/personal_information"
        android:textSize="@dimen/_18ssp"
        android:textColor="@color/black" />

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        >

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

            <de.hdodenhof.circleimageview.CircleImageView
                android:id="@+id/image"
                android:layout_width="@dimen/_100sdp"
                android:layout_height="@dimen/_100sdp"

                android:layout_gravity="center_horizontal"
                android:layout_marginTop="25dp"
                android:layout_marginBottom="15dp"

                app:civ_circle_background_color="@color/white"

                android:src="@drawable/ic_add_image"
                />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/first_name"
                android:fontFamily="@font/nunito_medium"
                android:textColor="@color/black"
                android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
                android:layout_gravity="start"
                android:layout_marginHorizontal="15dp"
                android:layout_marginTop="25dp"
                />

            <EditText
                android:id="@+id/name"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@drawable/edit_text_bg_2"
                android:layout_marginHorizontal="15dp"
                android:layout_marginVertical="10dp"

                android:hint="@string/enter_your_first_name"
                android:fontFamily="@font/nunito_regular"
                android:textColor="@color/black"
                android:textColorHint="@android:color/darker_gray"
                android:textAppearance="@style/TextAppearance.Material3.TitleMedium"

                android:paddingVertical="15dp"
                android:padding="10dp"

                android:drawableStart="@drawable/ic_user"
                android:drawablePadding="10dp"

                android:autofillHints="name"
                android:inputType="textCapWords"

                android:maxLength="50"
                android:digits="@string/allowed_alphabets_with_space"
                />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/date_of_birth"
                android:fontFamily="@font/nunito_medium"
                android:textColor="@color/black"
                android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
                android:layout_gravity="start"
                android:layout_marginHorizontal="15dp"
                android:layout_marginTop="15dp"
                />

            <TextView
                android:id="@+id/dob"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@drawable/edit_text_bg_2"
                android:layout_marginHorizontal="15dp"
                android:layout_marginVertical="10dp"

                android:hint="@string/enter_your_date_of_birth"
                android:fontFamily="@font/nunito_regular"
                android:textColor="@color/black"
                android:textColorHint="@android:color/darker_gray"
                android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
                android:gravity="center_vertical"

                android:paddingVertical="15dp"
                android:padding="10dp"

                android:drawablePadding="10dp"

                app:drawableStartCompat="@drawable/ic_dob" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/contact_number"
                android:fontFamily="@font/nunito_medium"
                android:textColor="@color/black"
                android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
                android:layout_gravity="start"
                android:layout_marginHorizontal="15dp"
                android:layout_marginTop="15dp"
                />

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

                android:layout_marginHorizontal="15dp"
                android:layout_marginVertical="10dp"

                android:gravity="center_vertical"

                android:background="@drawable/edit_text_bg_2"

                >

                <ImageView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:contentDescription="@string/phone_number"

                    android:layout_marginStart="10dp"

                    android:src="@drawable/ic_phone"
                    android:layout_marginVertical="10dp"/>

                <com.skydoves.powerspinner.PowerSpinnerView
                    android:id="@+id/country_codes"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"

                    android:background="@color/white_bg"

                    android:gravity="center"

                    android:padding="10dp"
                    android:textColor="@color/black"
                    android:textSize="14.5sp"

                    app:spinner_arrow_drawable="@drawable/ic_down"

                    app:spinner_popup_max_height="200dp"
                    app:spinner_arrow_animate="true"
                    app:fontFamily="@font/nunito_regular"

                    app:spinner_arrow_gravity="end"
                    app:spinner_arrow_padding="8dp"
                    app:spinner_divider_show="true"
                    app:spinner_divider_size="0.4dp"
                    app:spinner_divider_color="@color/black"
                    app:spinner_item_height="46dp"
                    app:spinner_popup_animation="dropdown"
                    app:spinner_popup_background="@drawable/edit_text_bg_2"
                    app:spinner_popup_elevation="14dp" />

                <View
                    android:layout_width="0.5dp"
                    android:layout_height="match_parent"

                    android:background="@android:color/darker_gray"
                    android:layout_marginVertical="10dp"/>

                <EditText
                    android:id="@+id/contact_number"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"

                    android:background="@android:color/transparent"

                    android:hint="@string/phone_number"
                    android:fontFamily="@font/nunito_regular"
                    android:textColor="@color/black"
                    android:textColorHint="@android:color/darker_gray"
                    android:textAppearance="@style/TextAppearance.Material3.TitleMedium"

                    android:paddingVertical="15dp"
                    android:padding="10dp"

                    android:autofillHints="phone"
                    android:inputType="number"

                    android:digits="@string/allowed_numbers"
                    />

            </LinearLayout>

            <LinearLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                android:layout_gravity="start"
                android:layout_marginHorizontal="15dp"
                android:layout_marginTop="15dp"
                >

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/email_address"
                    android:fontFamily="@font/nunito_medium"
                    android:textColor="@color/black"
                    android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
                    />

                <!--            <TextView-->
                <!--                android:layout_width="wrap_content"-->
                <!--                android:layout_height="wrap_content"-->
                <!--                android:text="@string/optional"-->
                <!--                android:fontFamily="@font/nunito_medium"-->
                <!--                android:textAppearance="@style/TextAppearance.Material3.TitleMedium"-->
                <!--                android:textColor="@android:color/darker_gray"-->
                <!--                android:layout_marginStart="5dp"-->
                <!--                />-->

            </LinearLayout>

            <EditText
                android:id="@+id/email"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"

                android:enabled="false"

                android:background="@drawable/edit_text_bg_2"
                android:layout_marginHorizontal="15dp"
                android:layout_marginVertical="10dp"

                android:hint="@string/enter_email_address"
                android:fontFamily="@font/nunito_regular"
                android:textColor="@color/black"
                android:textColorHint="@android:color/darker_gray"
                android:textAppearance="@style/TextAppearance.Material3.TitleMedium"

                android:paddingVertical="15dp"
                android:padding="10dp"

                android:drawableStart="@drawable/ic_email"
                android:drawablePadding="10dp"

                android:autofillHints="emailAddress"
                android:inputType="textEmailAddress"

                android:maxLength="255"
                />

            <LinearLayout
                android:id="@+id/address_view"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/patients_home_address"
                    android:layout_marginHorizontal="15dp"
                    android:layout_marginTop="15dp"
                    android:textColor="@color/black"
                    android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
                    android:fontFamily="@font/nunito_medium"
                    />

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"

                    android:orientation="horizontal"

                    android:background="@drawable/edit_text_bg_2"
                    android:layout_marginHorizontal="15dp"
                    android:focusable="false"
                    android:layout_marginVertical="10dp">

                    <ImageView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:contentDescription="@string/medication_type"

                        app:srcCompat="@drawable/ic_home"

                        android:layout_marginVertical="10dp"
                        android:layout_marginStart="10dp"

                        />

                    <TextView
                        android:id="@+id/country"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"

                        android:background="@color/white_bg"

                        android:gravity="center_vertical"

                        android:padding="10dp"
                        android:textColor="@color/black"
                        android:textAppearance="@style/TextAppearance.Material3.TitleMedium"

                        android:hint="@string/enter_your_country"
                        android:textColorHint="#A1A1A1"

                        app:spinner_arrow_drawable="@drawable/ic_down"
                        app:spinner_arrow_show="false"

                        app:spinner_popup_max_height="200dp"
                        app:spinner_arrow_animate="true"
                        app:fontFamily="@font/nunito_regular"

                        android:layout_marginVertical="5dp"
                        android:layout_marginEnd="5dp"

                        app:spinner_arrow_gravity="end"
                        app:spinner_arrow_padding="8dp"
                        app:spinner_arrow_tint="@color/black"
                        app:spinner_divider_show="true"
                        app:spinner_divider_size="0.4dp"
                        app:spinner_divider_color="@color/black"
                        app:spinner_item_height="46dp"
                        app:spinner_popup_animation="dropdown"
                        app:spinner_popup_background="@drawable/edit_text_bg_2"
                        app:spinner_popup_elevation="14dp"

                        />

                </LinearLayout>

                <TextView
                    android:id="@+id/street"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="@drawable/edit_text_bg_2"
                    android:layout_marginHorizontal="15dp"
                    android:layout_marginVertical="10dp"

                    android:hint="@string/enter_your_street"
                    android:fontFamily="@font/nunito_regular"
                    android:textColor="@color/black"
                    android:textColorHint="@android:color/darker_gray"
                    android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
                    android:gravity="center_vertical"

                    android:paddingVertical="5dp"
                    tools:text="Aditya"
                    android:padding="10dp"

                    android:drawablePadding="10dp"

                    android:autofillHints="postalAddress"

                    android:maxLength="255"
                    app:drawableStartCompat="@drawable/ic_home" />

                <TextView
                    android:id="@+id/town"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="@drawable/edit_text_bg_2"
                    android:layout_marginHorizontal="15dp"
                    android:layout_marginVertical="10dp"

                    android:hint="@string/enter_your_town"
                    android:fontFamily="@font/nunito_regular"
                    android:textColor="@color/black"
                    android:textColorHint="@android:color/darker_gray"
                    android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
                    android:gravity="center_vertical"

                    android:paddingVertical="5dp"
                    android:padding="10dp"

                    android:drawablePadding="10dp"

                    android:autofillHints="postalAddress"
                    app:drawableStartCompat="@drawable/ic_home" />

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"

                    android:orientation="horizontal"
                    android:focusable="false"
                    android:background="@drawable/edit_text_bg_2"
                    android:layout_marginHorizontal="15dp"
                    android:layout_marginVertical="10dp">

                    <ImageView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:contentDescription="@string/medication_type"

                        app:srcCompat="@drawable/ic_home"

                        android:layout_marginVertical="10dp"
                        android:layout_marginStart="10dp"

                        />

                    <TextView
                        android:id="@+id/state"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"

                        android:background="@color/white_bg"

                        android:gravity="center_vertical"

                        android:padding="10dp"
                        android:textColor="@color/black"
                        android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
                        android:fontFamily="@font/nunito_regular"

                        android:hint="@string/enter_your_state"
                        android:textColorHint="#A1A1A1"

                        android:layout_marginVertical="5dp"
                        android:layout_marginEnd="5dp"

                        />

                </LinearLayout>

                <TextView
                    android:id="@+id/zip_code"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="@drawable/edit_text_bg_2"
                    android:layout_marginHorizontal="15dp"
                    android:layout_marginVertical="10dp"

                    android:hint="@string/enter_your_zip_code"
                    android:fontFamily="@font/nunito_regular"
                    android:textColor="@color/black"
                    android:textColorHint="@android:color/darker_gray"
                    android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
                    android:gravity="center_vertical"

                    android:paddingVertical="5dp"
                    android:padding="10dp"

                    android:drawablePadding="10dp"

                    android:maxLength="6"

                    android:autofillHints="postalAddress"
                    app:drawableStartCompat="@drawable/ic_home" />

            </LinearLayout>

            <com.google.android.material.button.MaterialButton
                android:id="@+id/save"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginHorizontal="15dp"
                android:layout_marginVertical="15dp"
                android:text="@string/save"
                android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
                android:textAllCaps="false"
                android:fontFamily="@font/nunito_regular"
                android:textColor="@color/white_bg"
                android:paddingVertical="15dp"
                app:backgroundTint="@color/color_primary"
                app:cornerRadius="15dp"
                />

        </LinearLayout>

    </ScrollView>

</LinearLayout>