<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView
    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="wrap_content"
    android:layout_marginHorizontal="16dp"
    android:layout_marginVertical="6dp"
    style="@style/Widget.Material3.CardView.Filled"
    app:cardCornerRadius="16dp"
    android:clickable="true"
    android:focusable="true">

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

        <com.google.android.material.card.MaterialCardView
            android:id="@+id/avatar_container"
            android:layout_width="56dp"
            android:layout_height="56dp"
            style="@style/Widget.Material3.CardView.Elevated"
            app:cardCornerRadius="28dp"
            app:cardElevation="1dp"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintBottom_toBottomOf="parent">

            <ImageView
                android:id="@+id/image_avatar"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:scaleType="centerCrop"
                tools:src="@drawable/ic_account_circle"
                android:contentDescription="@string/profile_avatar" />

        </com.google.android.material.card.MaterialCardView>

        <com.google.android.material.card.MaterialCardView
            android:id="@+id/check_container"
            android:layout_width="20dp"
            android:layout_height="20dp"
            android:visibility="gone"
            style="@style/Widget.Material3.CardView.Filled"
            app:cardBackgroundColor="?attr/colorPrimary"
            app:cardCornerRadius="10dp"
            app:cardElevation="2dp"
            app:layout_constraintEnd_toEndOf="@id/avatar_container"
            app:layout_constraintBottom_toBottomOf="@id/avatar_container"
            tools:visibility="visible">

            <ImageView
                android:id="@+id/icon_check"
                android:layout_width="14dp"
                android:layout_height="14dp"
                android:layout_gravity="center"
                android:src="@drawable/ic_check"
                app:tint="?attr/colorOnPrimary"
                android:contentDescription="@string/profile_current_user" />

        </com.google.android.material.card.MaterialCardView>

        <LinearLayout
            android:id="@+id/text_container"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:layout_marginStart="12dp"
            android:layout_marginEnd="8dp"
            app:layout_constraintStart_toEndOf="@id/avatar_container"
            app:layout_constraintEnd_toStartOf="@id/button_edit"
            app:layout_constraintTop_toTopOf="@id/avatar_container"
            app:layout_constraintBottom_toBottomOf="@id/avatar_container">

            <TextView
                android:id="@+id/text_username"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textAppearance="?attr/textAppearanceTitleMedium"
                android:maxLines="1"
                android:ellipsize="end"
                tools:text="User Name" />

            <TextView
                android:id="@+id/text_uuid"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="2dp"
                android:textAppearance="?attr/textAppearanceBodySmall"
                android:maxLines="1"
                android:ellipsize="middle"
                android:textColor="?attr/colorOnSurfaceVariant"
                tools:text="12345678-1234-1234-1234-123456789012" />

        </LinearLayout>

        <com.google.android.material.button.MaterialButton
            android:id="@+id/button_edit"
            android:layout_width="40dp"
            android:layout_height="40dp"
            style="@style/Widget.Material3.Button.IconButton"
            app:icon="@drawable/ic_edit"
            app:iconTint="?attr/colorOnSurfaceVariant"
            app:layout_constraintEnd_toStartOf="@id/button_delete"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintBottom_toBottomOf="parent"
            android:contentDescription="@string/profile_edit" />

        <com.google.android.material.button.MaterialButton
            android:id="@+id/button_delete"
            android:layout_width="40dp"
            android:layout_height="40dp"
            style="@style/Widget.Material3.Button.IconButton"
            app:icon="@drawable/ic_delete"
            app:iconTint="?attr/colorError"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintBottom_toBottomOf="parent"
            android:contentDescription="@string/profile_delete" />

    </androidx.constraintlayout.widget.ConstraintLayout>

</com.google.android.material.card.MaterialCardView>
