<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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:id="@+id/main"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".ui.profile.editprofile.EditProfileCustActivity">

    <LinearLayout
        android:id="@+id/top_title"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:gravity="center_vertical"
        android:padding="16dp"
        android:layout_marginTop="16dp"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent">

        <ImageButton
            android:id="@+id/btn_back"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@drawable/ic_back_24"
            android:contentDescription="back"
            android:background="?attr/selectableItemBackgroundBorderless"/>

        <TextView
            android:id="@+id/tv_profile_title"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="Edit Profil"
            android:textSize="20sp"
            android:fontFamily="@font/dmsans_bold"
            android:textStyle="bold"
            android:gravity="center"/>

    </LinearLayout>

    <androidx.cardview.widget.CardView
        android:id="@+id/card_profile"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:cardCornerRadius="8dp"
        app:cardElevation="4dp"
        app:layout_constraintTop_toBottomOf="@id/top_title"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent">

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

            <!-- Profile Image -->
            <de.hdodenhof.circleimageview.CircleImageView
                android:id="@+id/profile_image"
                android:layout_width="100dp"
                android:layout_height="100dp"
                android:src="@drawable/baseline_account_circle_24"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintEnd_toEndOf="parent"/>

            <!-- Edit Icon -->
            <ImageView
                android:id="@+id/edit_icon"
                android:layout_width="32dp"
                android:layout_height="32dp"
                android:src="@drawable/ic_edit"
                android:background="@drawable/circle_background"
                android:padding="8dp"
                app:layout_constraintBottom_toBottomOf="@id/profile_image"
                app:layout_constraintEnd_toEndOf="@id/profile_image"
                android:layout_marginBottom="4dp"
                android:layout_marginEnd="4dp"
                app:tint="@color/blue_500" />

            <!-- Select Image Text -->
            <TextView
                android:id="@+id/tv_select_image"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Pilih Gambar"
                android:layout_marginTop="8dp"
                android:textColor="@color/blue_500"
                app:layout_constraintTop_toBottomOf="@id/profile_image"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintEnd_toEndOf="parent"/>

        </androidx.constraintlayout.widget.ConstraintLayout>

    </androidx.cardview.widget.CardView>

    <com.google.android.material.textfield.TextInputLayout
        android:id="@+id/til_nama"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="32dp"
        android:layout_marginHorizontal="16dp"
        app:layout_constraintTop_toBottomOf="@id/card_profile">

        <com.google.android.material.textfield.TextInputEditText
            android:id="@+id/et_name_user"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:hint="Nama"
            android:text="Nama Pengguna"
            android:inputType="textPersonName"/>
    </com.google.android.material.textfield.TextInputLayout>

    <com.google.android.material.textfield.TextInputLayout
        android:id="@+id/til_username"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="16dp"
        android:layout_marginHorizontal="16dp"
        app:layout_constraintTop_toBottomOf="@id/til_nama">

        <com.google.android.material.textfield.TextInputEditText
            android:id="@+id/et_username"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:hint="Username"
            android:text="Username Pengguna"
            android:inputType="text"/>
    </com.google.android.material.textfield.TextInputLayout>

    <com.google.android.material.textfield.TextInputLayout
        android:id="@+id/til_email"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginHorizontal="16dp"
        android:layout_marginTop="16dp"
        app:layout_constraintTop_toBottomOf="@id/til_username">

        <com.google.android.material.textfield.TextInputEditText
            android:id="@+id/et_email_user"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:hint="Email"
            android:text="Email Pengguna"
            android:inputType="textEmailAddress"/>
    </com.google.android.material.textfield.TextInputLayout>

    <com.google.android.material.textfield.TextInputLayout
        android:id="@+id/til_nomor_handphone"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="16dp"
        android:layout_marginHorizontal="16dp"
        app:layout_constraintTop_toBottomOf="@id/til_email">

        <com.google.android.material.textfield.TextInputEditText
            android:id="@+id/et_number_phone_user"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:hint="Nomor Handphone"
            android:text="Nomor handphone pengguna"
            android:inputType="phone"/>
    </com.google.android.material.textfield.TextInputLayout>

    <com.google.android.material.textfield.TextInputLayout
        android:id="@+id/til_tanggal_lahir"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="16dp"
        android:layout_marginHorizontal="16dp"
        app:layout_constraintTop_toBottomOf="@id/til_nomor_handphone">

        <com.google.android.material.textfield.TextInputEditText
            android:id="@+id/et_date_birth"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:hint="Tanggal Lahir"
            android:text="Tanggal Lahir Pengguna"
            android:inputType="date"
            android:focusable="false"
            android:clickable="true"/>
    </com.google.android.material.textfield.TextInputLayout>

    <Button
        android:id="@+id/btn_save"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Simpan"
        android:layout_marginTop="32dp"
        android:layout_marginHorizontal="16dp"
        android:layout_marginBottom="16dp"
        app:layout_constraintTop_toBottomOf="@id/til_tanggal_lahir"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"/>

</androidx.constraintlayout.widget.ConstraintLayout>