<?xml version="1.0" encoding="utf-8"?>
<org.joinmastodon.android.ui.views.SizeListenerLinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
	xmlns:tools="http://schemas.android.com/tools"
	android:orientation="vertical"
	android:layout_width="match_parent"
	android:layout_height="match_parent">

	<ScrollView
		android:layout_width="match_parent"
		android:layout_height="0dp"
		android:layout_weight="1"
		android:fillViewport="true">

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

			<EditText
				android:id="@+id/content_warning"
				android:layout_width="match_parent"
				android:layout_height="wrap_content"
				android:elevation="0dp"
				android:hint="@string/content_warning"
				android:inputType="textMultiLine|textCapSentences"
				android:visibility="gone"
				android:textColorHint="?android:textColorSecondary"
				android:background="@drawable/bg_cw_edit"
				android:padding="16dp"
				android:minHeight="56dp"
				android:textSize="16sp"
				tools:visibility="visible"/>

			<TextView
				android:id="@+id/reply_text"
				android:layout_width="match_parent"
				android:layout_height="wrap_content"
				android:layout_marginLeft="16dp"
				android:layout_marginRight="16dp"
				android:layout_marginTop="16dp"
				android:textAppearance="@style/m3_title_small"
				android:drawableStart="@drawable/ic_fluent_arrow_reply_20_filled"
				android:drawableTint="?android:textColorSecondary"
				android:drawablePadding="6dp"
				android:singleLine="true"
				android:ellipsize="end"/>

			<RelativeLayout
				android:layout_width="match_parent"
				android:layout_height="wrap_content"
				android:paddingTop="16dp"
				android:paddingRight="16dp"
				android:paddingLeft="16dp">

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

				<TextView
					android:id="@+id/name"
					android:layout_width="match_parent"
					android:layout_height="24dp"
					android:layout_toEndOf="@id/avatar"
					android:ellipsize="end"
					android:singleLine="true"
					android:textAppearance="@style/m3_title_medium"
					tools:text="Eugen" />

				<TextView
					android:id="@+id/username"
					android:layout_width="match_parent"
					android:layout_height="20dp"
					android:layout_below="@id/name"
					android:layout_toEndOf="@id/avatar"
					android:ellipsize="end"
					android:singleLine="true"
					android:textAppearance="@style/m3_title_small"
					tools:text="\@Gargron" />

			</RelativeLayout>

			<FrameLayout
				android:id="@+id/toot_text_wrap"
				android:layout_width="match_parent"
				android:layout_height="wrap_content"
				android:layout_marginTop="10dp">

				<org.joinmastodon.android.ui.views.ComposeEditText
					android:id="@+id/toot_text"
					android:layout_width="match_parent"
					android:layout_height="wrap_content"
					android:paddingLeft="16dp"
					android:paddingRight="16dp"
					android:paddingBottom="16dp"
					android:textAppearance="@style/m3_body_large"
					android:textSize="16sp"
					android:gravity="top"
					android:background="@null"
					android:hint="@string/compose_hint"
					android:elevation="0dp"
					android:inputType="textMultiLine|textCapSentences"/>

			</FrameLayout>

			<LinearLayout
				android:id="@+id/poll_wrap"
				android:layout_width="match_parent"
				android:layout_height="wrap_content"
				android:orientation="vertical"
				android:visibility="gone"
				tools:visibility="visible">
				<org.joinmastodon.android.ui.views.ReorderableLinearLayout
					android:id="@+id/poll_options"
					android:layout_width="match_parent"
					android:layout_height="wrap_content"
					android:orientation="vertical"/>
				<LinearLayout
					android:id="@+id/add_poll_option"
					android:layout_width="match_parent"
					android:layout_height="56dp"
					android:layout_marginStart="16dp"
					android:layout_marginEnd="56dp"
					android:layout_marginBottom="8dp"
					android:background="@drawable/bg_poll_option_clickable"
					android:outlineProvider="background"
					android:elevation="2dp">
					<ImageView
						android:layout_width="24dp"
						android:layout_height="24dp"
						android:layout_margin="16dp"
						android:tint="?colorDarkIcon"
						android:src="@drawable/ic_fluent_add_circle_24_regular"/>
				</LinearLayout>
				<TextView
					android:id="@+id/poll_duration"
					android:layout_width="match_parent"
					android:layout_height="wrap_content"
					android:layout_marginLeft="16dp"
					android:layout_marginRight="16dp"
					android:layout_marginBottom="8dp"
					android:textAppearance="@style/m3_label_large"
					android:textColor="?android:textColorPrimary"
					tools:text="Duration: 7 days"/>
			</LinearLayout>

			<org.joinmastodon.android.ui.views.ComposeMediaLayout
				android:id="@+id/attachments"
				android:layout_width="wrap_content"
				android:layout_height="wrap_content"
				android:layout_gravity="center_horizontal"
				android:visibility="gone"/>

		</LinearLayout>
	</ScrollView>

	<LinearLayout
		android:layout_width="match_parent"
		android:layout_height="48dp"
		android:orientation="horizontal"
		android:gravity="center_vertical"
		android:background="?colorBackgroundLightest"
		android:elevation="2dp"
		android:outlineProvider="bounds"
		android:paddingHorizontal="10dp"
		android:layout_marginEnd="6dp"
		android:layoutDirection="locale">

		<ImageButton
			android:id="@+id/btn_media"
			android:layout_width="36dp"
			android:layout_height="36dp"
			android:layout_marginEnd="12dp"
			android:background="?android:attr/actionBarItemBackground"
			android:padding="0px"
			android:tint="@color/compose_button"
			android:tintMode="src_in"
			android:contentDescription="@string/add_media"
			android:tooltipText="@string/add_media"
			android:src="@drawable/ic_fluent_image_24_regular"/>

		<ImageButton
			android:id="@+id/btn_poll"
			android:layout_width="36dp"
			android:layout_height="36dp"
			android:layout_marginEnd="12dp"
			android:background="?android:attr/actionBarItemBackground"
			android:padding="0px"
			android:tint="@color/compose_button"
			android:tintMode="src_in"
			android:contentDescription="@string/add_poll"
			android:tooltipText="@string/add_poll"
			android:src="@drawable/ic_fluent_poll_24_selector"/>

		<ImageButton
			android:id="@+id/btn_emoji"
			android:layout_width="36dp"
			android:layout_height="36dp"
			android:layout_marginEnd="12dp"
			android:background="?android:attr/actionBarItemBackground"
			android:padding="0px"
			android:tint="@color/compose_button"
			android:tintMode="src_in"
			android:contentDescription="@string/emoji"
			android:tooltipText="@string/emoji"
			android:src="@drawable/ic_fluent_emoji_24_selector"/>

		<ImageButton
			android:id="@+id/btn_spoiler"
			android:layout_width="36dp"
			android:layout_height="36dp"
			android:layout_marginEnd="12dp"
			android:background="?android:attr/actionBarItemBackground"
			android:padding="0px"
			android:tint="@color/compose_button"
			android:tintMode="src_in"
			android:contentDescription="@string/content_warning"
			android:tooltipText="@string/content_warning"
			android:src="@drawable/ic_fluent_chat_warning_24_selector"/>

		<ImageButton
			android:id="@+id/btn_visibility"
			android:layout_width="36dp"
			android:layout_height="36dp"
			android:layout_marginEnd="12dp"
			android:background="?android:attr/actionBarItemBackground"
			android:padding="0px"
			android:tint="@color/compose_button"
			android:tintMode="src_in"
			android:contentDescription="@string/post_visibility"
			android:tooltipText="@string/post_visibility"
			android:src="@drawable/ic_fluent_earth_24_regular"/>

		<Space
			android:layout_width="0px"
			android:layout_height="1px"
			android:layout_weight="1"/>

		<TextView
			android:id="@+id/char_counter"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:textAppearance="@style/m3_body_large"
			android:textColor="?android:textColorSecondary"
			tools:text="500"/>

	</LinearLayout>

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