<?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:id="@+id/scroll_view"
		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">

			<LinearLayout
				android:id="@+id/original_post"
				android:layout_width="match_parent"
				android:layout_height="wrap_content"
				android:orientation="vertical"
				android:visibility="gone"
				android:background="?android:selectableItemBackground">
				<include layout="@layout/display_item_header" />
				<include layout="@layout/display_item_text" />
				<View
					android:layout_width="match_parent"
					android:layout_height="1dp"
					android:background="?attr/colorPollVoted"/>

			</LinearLayout>

			<LinearLayout
				android:id="@+id/reply_wrap"
				android:orientation="vertical"
				android:layout_width="match_parent"
				android:layout_height="wrap_content">

				<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="wrap_content"
					android:layout_height="wrap_content"
					android:layout_marginBottom="-12dp"
					android:layout_marginStart="16dp"
					android:paddingTop="16dp"
					android:paddingBottom="6dp"
					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:text="@string/sk_in_reply"
					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/self_avatar"
						android:layout_width="46sp"
						android:layout_height="46sp"
						android:layout_alignParentStart="true"
						android:layout_alignParentTop="true"
						android:layout_marginEnd="12dp" />

					<TextView
						android:id="@+id/self_name"
						android:layout_width="wrap_content"
						android:layout_height="wrap_content"
						android:layout_toEndOf="@id/self_avatar"
						android:paddingTop="4sp"
						android:minHeight="24sp"
						android:ellipsize="end"
						android:singleLine="true"
						android:textAppearance="@style/m3_title_medium"
						tools:text="Eugen" />

					<TextView
						android:id="@+id/self_extra_text"
						android:layout_width="wrap_content"
						android:layout_height="wrap_content"
						android:layout_marginStart="8sp"
						android:layout_toEndOf="@id/self_name"
						android:paddingTop="4sp"
						android:ellipsize="end"
						android:fontFamily="sans-serif"
						android:singleLine="true"
						android:textAlignment="viewStart"
						android:textAppearance="@style/m3_title_medium"
						tools:text="@string/sk_local_only" />

					<TextView
						android:id="@+id/self_username"
						android:layout_width="match_parent"
						android:layout_height="wrap_content"
						android:layout_below="@id/self_name"
						android:layout_toEndOf="@id/self_avatar"
						android:minHeight="20sp"
						android:ellipsize="end"
						android:singleLine="true"
						android:textAppearance="@style/m3_title_small"
						tools:text="\@Gargron" />

				</RelativeLayout>

				<TextView
					android:id="@+id/reply_text_below"
					android:layout_width="wrap_content"
					android:layout_height="wrap_content"
					android:layout_marginTop="-6dp"
					android:layout_marginBottom="-6dp"
					android:layout_marginStart="16dp"
					android:paddingTop="16dp"
					android:paddingBottom="6dp"
					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:text="@string/sk_in_reply"
					android:ellipsize="end"/>

				<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:contentDescription="@string/mo_poll_option_add"
						android:elevation="2dp">
						<ImageView
							android:id="@+id/add_poll_option_icon"
							android:layout_width="24dp"
							android:layout_height="24dp"
							android:layout_margin="16dp"
							android:tint="?colorDarkIcon"
							android:importantForAccessibility="no"
							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
						android:id="@+id/poll_allow_multiple"
						android:orientation="horizontal"
						android:layout_width="match_parent"
						android:layout_height="wrap_content"
						android:layout_marginBottom="16dp"
						android:layout_marginTop="8dp"
						android:gravity="center_vertical"
						android:layoutDirection="locale"
						android:paddingLeft="16dp"
						android:paddingRight="16dp"
						android:paddingTop="12dp"
						android:paddingBottom="12dp"
						android:background="?android:selectableItemBackground">

						<CheckBox
							android:id="@+id/poll_allow_multiple_checkbox"
							android:clickable="false"
							android:layout_width="wrap_content"
							android:layout_height="24dp"
							android:layout_marginEnd="24dp"
							android:duplicateParentState="true"
							android:importantForAccessibility="no"/>

						<TextView
							android:layout_width="0dp"
							android:layout_height="wrap_content"
							android:layout_weight="1"
							android:textSize="16sp"
							android:singleLine="true"
							android:text="@string/sk_poll_allow_multiple" />
					</LinearLayout>
				</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
					android:id="@+id/sensitive_item"
					android:orientation="horizontal"
					android:layout_width="match_parent"
					android:layout_height="wrap_content"
					android:layout_marginBottom="16dp"
					android:layout_marginTop="8dp"
					android:gravity="center_vertical"
					android:layoutDirection="locale"
					android:paddingLeft="16dp"
					android:paddingRight="16dp"
					android:paddingTop="12dp"
					android:paddingBottom="12dp"
					android:background="?android:selectableItemBackground"
					android:visibility="gone">

					<ImageView
						android:id="@+id/sensitive_icon"
						android:layout_width="24dp"
						android:layout_height="24dp"
						android:layout_marginEnd="32dp"
						android:src="@drawable/ic_fluent_flag_24_selector"
						android:tint="?android:textColorPrimary"
						android:importantForAccessibility="no"/>

					<TextView
						android:layout_width="0dp"
						android:layout_height="wrap_content"
						android:layout_weight="1"
						android:textSize="16sp"
						android:singleLine="true"
						android:text="@string/sk_mark_media_as_sensitive" />
				</LinearLayout>
			</LinearLayout>
		</LinearLayout>
	</ScrollView>

	<LinearLayout
		android:layout_width="match_parent"
		android:layout_height="wrap_content"
		android:orientation="vertical"
		android:background="?colorBackgroundLightest"
		android:elevation="2dp"
		android:outlineProvider="bounds"
		android:paddingHorizontal="10dp"
		android:layoutDirection="locale">
		<LinearLayout
			android:id="@+id/schedule_draft_view"
			android:layout_width="match_parent"
			android:layout_height="wrap_content"
			android:gravity="center_vertical"
			android:minHeight="48dp"
			android:paddingTop="4dp">

			<TextView
				android:id="@+id/schedule_draft_text"
				android:layout_width="wrap_content"
				android:layout_height="wrap_content"
				android:drawableStart="@drawable/ic_fluent_drafts_20_regular"
				android:drawableTint="?android:textColorSecondary"
				android:drawablePadding="16dp"
				android:text="@string/sk_compose_draft" />

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

			<Button
				android:id="@+id/scheduled_time_btn"
				android:layout_width="wrap_content"
				android:layout_height="wrap_content"
				android:layout_marginStart="8dp"
				android:gravity="center"
				android:padding="8dp"
				android:textSize="14sp"
				android:minHeight="40dp"
				android:textColor="?android:textColorSecondary"
				android:background="@drawable/bg_text_button"
				android:fontFamily="sans-serif"
				android:drawableStart="@drawable/ic_fluent_clock_20_regular"
				android:drawablePadding="8dp"
				android:drawableTint="?android:textColorSecondary"
				tools:text="Dec 12, 2021, 12:42 PM"/>
			<ImageButton
				android:id="@+id/schedule_draft_dismiss"
				android:layout_width="24dp"
				android:layout_height="24dp"
				android:layout_marginStart="8dp"
				android:src="@drawable/ic_fluent_dismiss_20_filled"
				android:background="?android:selectableItemBackgroundBorderless"
				android:contentDescription="@string/sk_compose_no_schedule"
				android:padding="4dp"/>
		</LinearLayout>

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

			<ImageButton
				android:id="@+id/btn_media"
				android:layout_width="36dp"
				android:layout_height="36dp"
				android:layout_marginEnd="8dp"
				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_add_24_regular"/>

			<ImageButton
				android:id="@+id/btn_poll"
				android:layout_width="36dp"
				android:layout_height="36dp"
				android:layout_marginEnd="8dp"
				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="8dp"
				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="8dp"
				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="8dp"
				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"/>

			<Button
				android:id="@+id/drafts_btn"
				android:layout_width="32dp"
				android:layout_height="32dp"
				android:padding="0px"
				android:paddingStart="4dp"
				android:layout_marginEnd="8dp"
				android:drawableStart="@drawable/ic_fluent_clock_24_regular"
				android:drawableTint="@color/compose_button"
				android:textColor="?android:textColorSecondary"
				android:background="?android:attr/selectableItemBackgroundBorderless"
				android:visibility="gone"
				android:contentDescription="@string/sk_schedule_or_draft"
				android:tooltipText="@string/sk_schedule_or_draft" />

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

			<ImageButton
				android:id="@+id/btn_more"
				android:layout_width="24dp"
				android:layout_height="24dp"
				android:layout_marginEnd="24dp"
				android:background="?android:attr/selectableItemBackgroundBorderless"
				android:padding="0px"
				android:tint="@color/compose_button"
				android:tintMode="src_in"
				android:contentDescription="@string/more_options"
				android:tooltipText="@string/more_options"
				android:visibility="gone"
				android:src="@drawable/ic_fluent_more_vertical_24_regular"/>

			<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"
				android:visibility="gone"
				tools:text="500"/>

			<Button
				android:id="@+id/publish"
				android:layout_width="wrap_content"
				android:layout_height="wrap_content"
				android:layout_marginStart="12dp"
				android:visibility="gone"
				android:tooltipText="@string/publish"
				android:contentDescription="@string/publish"
				android:drawableStart="@drawable/ic_fluent_send_24_selector"
				/>

		</LinearLayout>
	</LinearLayout>

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