<?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"
	xmlns:app="http://schemas.android.com/apk/res-auto"
	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:id="@+id/compose_main_ll"
			android:layout_width="match_parent"
			android:layout_height="wrap_content"
			android:orientation="vertical">


			<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_reply_20px"
				android:drawableTint="?colorM3OnSurfaceVariant"
				android:drawablePadding="6dp"
				android:textColor="?colorM3OnSurfaceVariant"
				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="56dp"
					android:layout_height="56dp"
					android:layout_alignParentStart="true"
					android:layout_alignParentTop="true"
					android:layout_marginEnd="12dp"
					android:importantForAccessibility="no"
					tools:src="#0f0"/>

				<TextView
					android:id="@+id/name"
					android:layout_width="wrap_content"
					android:layout_height="20dp"
					android:layout_toEndOf="@id/avatar"
					android:ellipsize="end"
					android:singleLine="true"
					android:textAppearance="@style/m3_body_medium"
					android:fontFamily="sans-serif-medium"
					android:textColor="?colorM3OnSurface"
					android:gravity="center_vertical"
					tools:text="Eugen" />

				<TextView
					android:id="@+id/username"
					android:layout_width="match_parent"
					android:layout_height="20dp"
					android:layout_alignTop="@id/name"
					android:layout_toEndOf="@id/name"
					android:layout_marginStart="4dp"
					android:ellipsize="end"
					android:singleLine="true"
					android:textAppearance="@style/m3_body_medium"
					android:textColor="?colorM3OnSurfaceVariant"
					tools:text="\@Gargron" />
				
				<Button
					android:id="@+id/btn_visibility"
					android:layout_width="wrap_content"
					android:layout_height="28dp"
					android:layout_below="@id/name"
					android:layout_toEndOf="@id/avatar"
					android:layout_marginTop="8dp"
					android:textAppearance="@style/m3_label_large"
					android:background="@drawable/bg_filter_chip"
					android:textColor="?colorM3OnSurfaceVariant"
					android:paddingLeft="8dp"
					android:paddingRight="8dp"
					android:drawablePadding="8dp"
					tools:text="@string/visibility_public"/>

			</RelativeLayout>

			<org.joinmastodon.android.ui.views.FloatingHintEditTextLayout
				android:id="@+id/content_warning_wrap"
				android:layout_width="match_parent"
				android:layout_height="wrap_content"
				android:layout_marginTop="16dp"
				android:layout_marginLeft="16dp"
				android:layout_marginRight="16dp"
				android:paddingTop="8dp"
				android:paddingBottom="8dp"
				android:visibility="gone"
				android:background="@drawable/bg_cw_edit"
				android:addStatesFromChildren="true"
				app:labelTextColor="?colorM3Primary"
				app:editTextOffsetY="8dp"
				tools:visibility="visible">
				<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:textColorHint="?colorM3OnSurfaceVariant"
					android:paddingLeft="21dp"
					android:paddingRight="21dp"
					android:paddingTop="8dp"
					android:paddingBottom="8dp"
					android:minHeight="40dp"
					android:textAppearance="@style/m3_body_large"
					android:textColor="?colorM3OnSurface"
					android:background="@null"
					android:maxLines="3"/>
			</org.joinmastodon.android.ui.views.FloatingHintEditTextLayout>

			<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:textColor="?colorM3OnSurface"
					android:textColorHint="?colorM3OnSurfaceVariant"
					android:inputType="textMultiLine|textCapSentences"/>

			</FrameLayout>

			<RelativeLayout
				android:id="@+id/poll_wrap"
				android:layout_width="match_parent"
				android:layout_height="wrap_content"
				android:clipChildren="false"
				android:clipToPadding="false"
				android:paddingBottom="16dp"
				android:visibility="gone"
				tools:visibility="visible">
				<LinearLayout
					android:id="@+id/poll_settings"
					android:layout_width="match_parent"
					android:layout_height="48dp"
					android:layout_marginTop="12dp"
					android:layout_marginLeft="16dp"
					android:layout_marginRight="16dp"
					android:layout_below="@id/poll_options"
					android:gravity="center_vertical"
					android:divider="@drawable/divider_vertical_variant_1dp"
					android:showDividers="middle"
					android:dividerPadding="8dp">

					<ImageButton
						android:id="@+id/add_poll_option"
						android:layout_width="40dp"
						android:layout_height="40dp"
						android:layout_marginStart="4dp"
						android:layout_marginEnd="20dp"
						android:src="@drawable/ic_add_24px"
						android:tint="@color/button_text_m3_tonal"
						android:background="@drawable/bg_button_m3_tonal"
						android:contentDescription="@string/add_poll_option"/>

					<ImageView
						android:id="@+id/delete_poll_option"
						android:layout_width="40dp"
						android:layout_height="40dp"
						android:layout_marginStart="4dp"
						android:layout_marginEnd="20dp"
						android:src="@drawable/ic_delete_24px"
						android:scaleType="center"
						android:tint="?colorM3Error"
						android:background="@drawable/bg_button_m3_tonal_error"
						android:visibility="gone"
						tools:visibility="visible"
						android:contentDescription="@string/delete_poll_option"/>

					<LinearLayout
						android:id="@+id/poll_duration"
						android:layout_width="wrap_content"
						android:layout_height="match_parent"
						android:layout_marginHorizontal="8dp"
						android:orientation="vertical"
						android:paddingHorizontal="8dp"
						android:gravity="center_vertical"
						android:background="@drawable/bg_rect_4dp_ripple">
						
						<TextView
							android:layout_width="wrap_content"
							android:layout_height="16dp"
							android:textAppearance="@style/m3_label_small"
							android:textColor="?colorM3Secondary"
							android:gravity="center_vertical"
							android:singleLine="true"
							android:ellipsize="end"
							android:text="@string/poll_length"/>
						
						<TextView
							android:id="@+id/poll_duration_value"
							android:layout_width="wrap_content"
							android:layout_height="20dp"
							android:layout_marginTop="2dp"
							android:gravity="center_vertical"
							android:textAppearance="@style/m3_label_large"
							android:textColor="?colorM3Primary"
							android:singleLine="true"
							android:ellipsize="end"
							tools:text="1 day"/>
						
					</LinearLayout>

					<LinearLayout
						android:id="@+id/poll_style"
						android:layout_width="wrap_content"
						android:layout_height="match_parent"
						android:layout_marginHorizontal="8dp"
						android:orientation="vertical"
						android:paddingHorizontal="8dp"
						android:gravity="center_vertical"
						android:background="@drawable/bg_rect_4dp_ripple">

						<TextView
							android:layout_width="wrap_content"
							android:layout_height="16dp"
							android:textAppearance="@style/m3_label_small"
							android:textColor="?colorM3Secondary"
							android:gravity="center_vertical"
							android:singleLine="true"
							android:ellipsize="end"
							android:text="@string/poll_style"/>

						<TextView
							android:id="@+id/poll_style_value"
							android:layout_width="wrap_content"
							android:layout_height="20dp"
							android:layout_marginTop="2dp"
							android:gravity="center_vertical"
							android:textAppearance="@style/m3_label_large"
							android:textColor="?colorM3Primary"
							android:singleLine="true"
							android:ellipsize="end"
							tools:text="Pick one"/>

					</LinearLayout>

				</LinearLayout>
				<org.joinmastodon.android.ui.views.ReorderableLinearLayout
					android:id="@+id/poll_options"
					android:layout_width="match_parent"
					android:layout_height="wrap_content"
					android:layout_alignParentTop="true"
					android:layout_marginHorizontal="16dp"
					android:showDividers="middle"
					android:orientation="vertical"/>
				<View
					android:id="@+id/poll_poof"
					android:layout_width="40dp"
					android:layout_height="40dp"
					android:layout_alignTop="@id/poll_settings"
					android:layout_alignStart="@id/poll_settings"
					android:layout_marginStart="4dp"
					android:layout_marginTop="4dp"
					android:visibility="invisible"
					tools:visibility="visible"
					android:background="@drawable/poof"/>
			</RelativeLayout>

			<org.joinmastodon.android.ui.views.HorizontalScrollViewThatRespectsMatchParent
				android:id="@+id/attachments_scroller"
				android:layout_width="match_parent"
				android:layout_height="wrap_content"
				android:fillViewport="true"
				android:scrollbars="none"
				android:clipChildren="false"
				android:visibility="gone">
				<org.joinmastodon.android.ui.views.ReorderableLinearLayout
					android:id="@+id/attachments"
					android:layout_width="wrap_content"
					android:layout_height="300dp"
					android:orientation="horizontal"
					android:showDividers="middle"
					android:clipToPadding="false"
					android:paddingHorizontal="16dp"/>
			</org.joinmastodon.android.ui.views.HorizontalScrollViewThatRespectsMatchParent>

		</LinearLayout>
	</ScrollView>

	<LinearLayout
		android:id="@+id/bottom_bar"
		android:layout_width="match_parent"
		android:layout_height="48dp"
		android:elevation="3dp"
		android:outlineProvider="bounds"
		android:gravity="bottom"
		android:orientation="vertical">

		<View
			android:id="@+id/bottom_bar_autocomplete_divider"
			android:layout_width="match_parent"
			android:layout_height="1dp"
			android:layout_marginHorizontal="16dp"
			android:layout_marginBottom="4dp"
			android:visibility="invisible"
			android:background="?colorM3OutlineVariant"/>

		<LinearLayout
			android:layout_width="match_parent"
			android:layout_height="48dp"
			android:orientation="horizontal"
			android:gravity="center_vertical"
			android:layoutDirection="locale">

			<ImageButton
				android:id="@+id/btn_media"
				android:layout_width="36dp"
				android:layout_height="36dp"
				android:layout_marginEnd="12dp"
				android:layout_marginStart="12dp"
				android:background="@drawable/bg_compose_button"
				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_add_photo_alternate_24px"/>

			<ImageButton
				android:id="@+id/btn_poll"
				android:layout_width="36dp"
				android:layout_height="36dp"
				android:layout_marginEnd="12dp"
				android:background="@drawable/bg_compose_button"
				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_compose_poll"/>

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

			<ImageButton
				android:id="@+id/btn_spoiler"
				android:layout_width="36dp"
				android:layout_height="36dp"
				android:layout_marginEnd="12dp"
				android:background="@drawable/bg_compose_button"
				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_compose_cw"/>

			<ImageButton
				android:id="@+id/btn_language"
				android:layout_width="36dp"
				android:layout_height="36dp"
				android:layout_marginEnd="12dp"
				android:background="@drawable/bg_compose_button"
				android:padding="0px"
				android:tint="@color/compose_button"
				android:tintMode="src_in"
				android:contentDescription="@string/language"
				android:tooltipText="@string/language"
				android:src="@drawable/ic_language_24px"/>

			<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:layout_marginEnd="16dp"
				android:textAppearance="@style/m3_label_large"
				android:textColor="?colorM3OnSurface"
				tools:text="500"/>

		</LinearLayout>
	</LinearLayout>

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