<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
	xmlns:tools="http://schemas.android.com/tools"
	xmlns:app="http://schemas.android.com/apk/res-auto"
	android:layout_width="match_parent"
	android:layout_height="wrap_content"
	android:paddingHorizontal="16dp">
	<!-- paddingEnd is set programmatically (depending on item.inset) -->

	<LinearLayout
		android:id="@+id/buttons"
		android:layout_width="wrap_content"
		android:layout_height="wrap_content"
		android:layout_marginTop="5dp"
		android:layout_alignParentTop="true"
		android:layout_alignParentEnd="true">

		<!-- announcements-only -->
		<ImageView
			android:id="@+id/unread_indicator"
			android:layout_width="36dp"
			android:layout_height="48dp"
			android:visibility="gone"
			android:tint="?android:colorAccent"
			android:scaleType="center"
			android:src="@drawable/ic_fluent_circle_small_20_filled" />

		<ImageView
			android:id="@+id/mark_as_read"
			android:layout_width="36dp"
			android:layout_height="48dp"
			android:background="?android:actionBarItemBackground"
			android:scaleType="center"
			android:src="@drawable/ic_fluent_checkmark_24_regular"
			android:tint="?colorM3OnSurfaceVariant"
			android:contentDescription="@string/sk_mark_as_read"
			android:tooltipText="@string/sk_mark_as_read"
			android:visibility="gone" />

		<!-- on start because it's hidden based on if spoiler is revealed -->
		<ImageView
			android:id="@+id/visibility"
			android:layout_width="36dp"
			android:layout_height="48dp"
			android:background="?android:actionBarItemBackground"
			android:scaleType="center"
			android:contentDescription="@string/spoiler_hide"
			android:tooltipText="@string/spoiler_hide"
			android:src="@drawable/ic_fluent_eye_24_regular"
			android:tint="?colorM3OnSurfaceVariant"
			android:visibility="gone" />

		<FrameLayout
			android:id="@+id/collapse_btn"
			android:layout_width="36dp"
			android:layout_height="48dp"
			android:background="?android:actionBarItemBackground"
			android:visibility="gone"
			android:importantForAccessibility="noHideDescendants">

			<!-- wrapping this button so the flip animation doesn't flip the background and the tooltip
                  isn't displaced by the -1 scale -->

			<ImageView
				android:id="@+id/collapse_btn_icon"
				android:layout_width="wrap_content"
				android:layout_height="wrap_content"
				android:layout_gravity="center"
				android:importantForAccessibility="no"
				android:scaleType="center"
				android:src="@drawable/ic_fluent_chevron_down_20_filled"
				android:tint="?colorM3OnSurfaceVariant" />

		</FrameLayout>

		<ImageView
			android:id="@+id/more"
			android:layout_width="36dp"
			android:layout_height="48dp"
			android:background="?android:actionBarItemBackground"
			android:scaleType="center"
			android:tint="?colorM3OnSurfaceVariant"
			android:tooltipText="@string/more_options"
			android:contentDescription="@string/more_options"
			android:src="@drawable/ic_fluent_more_vertical_20_filled" />

		<ImageView
			android:id="@+id/delete_notification"
			android:layout_width="36dp"
			android:layout_height="48dp"
			android:visibility="gone"
			android:background="?android:actionBarItemBackground"
			android:contentDescription="@string/sk_delete_notification"
			android:tooltipText="@string/sk_delete_notification"
			android:scaleType="center"
			android:src="@drawable/ic_fluent_dismiss_20_filled"
			android:tint="?colorM3OnSurfaceVariant" />
	</LinearLayout>

	<ImageView
		android:id="@+id/avatar"
		android:layout_width="46sp"
		android:layout_height="46sp"
		android:layout_alignParentStart="true"
		android:layout_alignParentTop="true"
		android:layout_marginTop="16dp"
		android:layout_marginEnd="12dp" />

	<org.joinmastodon.android.ui.views.HeaderSubtitleLinearLayout
		android:id="@+id/name_wrap"
		app:firstFraction="60%"
		android:layout_width="match_parent"
		android:layout_height="wrap_content"
		android:layout_toEndOf="@id/avatar"
		android:layout_toStartOf="@id/buttons"
		android:layout_marginEnd="8dp"
		android:layout_above="@+id/time_and_username">

		<TextView
			android:id="@+id/name"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:ellipsize="end"
			android:singleLine="true"
			android:textAppearance="@style/m3_title_medium"
			android:textColor="?colorM3OnSurface"
			android:gravity="start|center_vertical"
			tools:text="Eugen" />

		<TextView
			android:id="@+id/extra_text"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_marginStart="8sp"
			android:ellipsize="end"
			android:singleLine="true"
			android:textAppearance="@style/m3_body_medium"
			android:textAlignment="viewStart"
			android:textColor="?colorM3OnSurface"
			tools:text="boosted your cat picture" />

	</org.joinmastodon.android.ui.views.HeaderSubtitleLinearLayout>

	<org.joinmastodon.android.ui.views.HeaderSubtitleLinearLayout
		android:layout_width="match_parent"
		android:layout_height="wrap_content"
		android:id="@+id/time_and_username"
		android:layout_alignBottom="@id/avatar"
		android:layout_marginEnd="8dp"
		android:layout_toStartOf="@id/buttons"
		android:layout_toEndOf="@id/avatar"
		android:layout_marginBottom="3sp">

		<TextView
			android:id="@+id/username"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:textAlignment="viewStart"
			android:singleLine="true"
			android:ellipsize="end"
			android:textAppearance="@style/m3_body_medium"
			android:textColor="?colorM3OnSurfaceVariant"
			tools:text="\@Gargron@mastodon.social"/>

		<ImageView
			android:id="@+id/bot_icon"
			android:layout_width="16sp"
			android:layout_height="16sp"
			android:layout_marginStart="4sp"
			android:layout_gravity="center_vertical"
			android:visibility="gone"
			android:importantForAccessibility="no"
			android:contentDescription="@string/sk_icon_bot"
			android:src="@drawable/ic_fluent_bot_20_filled" />

		<TextView
			android:id="@+id/separator"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_marginHorizontal="4sp"
			android:textAlignment="viewStart"
			android:importantForAccessibility="no"
			android:singleLine="true"
			android:textAppearance="@style/m3_body_medium"
			android:textColor="?colorM3OnSurfaceVariant"
			android:text="@string/sk_separator"/>


		<TextView
			android:id="@+id/time"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:textAlignment="viewStart"
			android:singleLine="true"
			android:ellipsize="end"
			android:textAppearance="@style/m3_body_medium"
			android:textColor="?colorM3OnSurfaceVariant"
			tools:text="9h ago"/>

	</org.joinmastodon.android.ui.views.HeaderSubtitleLinearLayout>

</RelativeLayout>