<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView 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="match_parent"
	tools:context=".ui.add.AddRecipeFragment">

	<androidx.constraintlayout.widget.ConstraintLayout
		android:id="@+id/holder"
		android:layout_width="match_parent"
		android:layout_height="wrap_content"
		android:paddingBottom="200dp">

		<com.google.android.material.textfield.TextInputLayout
			android:id="@+id/recipe_name_input_layout"
			style="@style/SmallMarginTextInputLayoutStyle"
			android:hint="@string/fragment_add_recipe_recipe_name"
			app:layout_constraintBottom_toTopOf="@+id/recipe_description_input_layout"
			app:layout_constraintEnd_toEndOf="parent"
			app:layout_constraintStart_toStartOf="parent"
			app:layout_constraintTop_toTopOf="parent">

			<com.google.android.material.textfield.TextInputEditText
				android:id="@+id/recipe_name_input"
				android:layout_width="match_parent"
				android:layout_height="wrap_content"
				android:inputType="text" />
		</com.google.android.material.textfield.TextInputLayout>

		<com.google.android.material.textfield.TextInputLayout
			android:id="@+id/recipe_description_input_layout"
			style="@style/SmallMarginTextInputLayoutStyle"
			android:hint="@string/fragment_add_recipe_recipe_description"
			app:layout_constraintEnd_toEndOf="parent"
			app:layout_constraintStart_toStartOf="parent"
			app:layout_constraintTop_toBottomOf="@+id/recipe_name_input_layout">

			<com.google.android.material.textfield.TextInputEditText
				android:id="@+id/recipe_description_input"
				android:layout_width="match_parent"
				android:layout_height="wrap_content"
				android:inputType="textMultiLine" />
		</com.google.android.material.textfield.TextInputLayout>

		<com.google.android.material.textfield.TextInputLayout
			android:id="@+id/recipe_yield_input_layout"
			style="@style/SmallMarginTextInputLayoutStyle"
			android:hint="@string/fragment_add_recipe_recipe_yield"
			app:layout_constraintEnd_toEndOf="parent"
			app:layout_constraintStart_toStartOf="parent"
			app:layout_constraintTop_toBottomOf="@+id/recipe_description_input_layout">

			<com.google.android.material.textfield.TextInputEditText
				android:id="@+id/recipe_yield_input"
				android:layout_width="match_parent"
				android:layout_height="wrap_content"
				android:inputType="text" />
		</com.google.android.material.textfield.TextInputLayout>

		<androidx.constraintlayout.helper.widget.Flow
			android:id="@+id/ingredients_flow"
			android:layout_width="0dp"
			android:layout_height="wrap_content"
			android:orientation="vertical"
			android:padding="@dimen/margin_small"
			app:layout_constraintEnd_toEndOf="parent"
			app:layout_constraintStart_toStartOf="parent"
			app:layout_constraintTop_toBottomOf="@+id/recipe_yield_input_layout" />

		<Button
			android:id="@+id/new_ingredient_button"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_margin="@dimen/margin_small"
			android:text="@string/fragment_add_recipe_new_ingredient"
			app:layout_constraintEnd_toEndOf="parent"
			app:layout_constraintTop_toBottomOf="@+id/ingredients_flow" />

		<androidx.constraintlayout.helper.widget.Flow
			android:id="@+id/instructions_flow"
			android:layout_width="0dp"
			android:layout_height="wrap_content"
			android:orientation="vertical"
			android:padding="@dimen/margin_small"
			app:layout_constraintEnd_toEndOf="parent"
			app:layout_constraintStart_toStartOf="parent"
			app:layout_constraintTop_toBottomOf="@+id/new_ingredient_button" />

		<Button
			android:id="@+id/new_instruction_button"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_margin="@dimen/margin_small"
			android:text="@string/fragment_add_recipe_new_instruction"
			app:layout_constraintEnd_toEndOf="parent"
			app:layout_constraintTop_toBottomOf="@+id/instructions_flow" />

		<androidx.constraintlayout.helper.widget.Flow
			android:id="@+id/switches_flow"
			android:layout_width="0dp"
			android:layout_height="wrap_content"
			android:layout_margin="@dimen/margin_small"
			android:orientation="vertical"
			app:constraint_referenced_ids="public_recipe,disable_comments"
			app:layout_constraintEnd_toEndOf="parent"
			app:layout_constraintStart_toStartOf="parent"
			app:layout_constraintTop_toBottomOf="@+id/new_instruction_button" />

		<com.google.android.material.switchmaterial.SwitchMaterial
			android:id="@+id/public_recipe"
			android:layout_width="0dp"
			android:layout_height="wrap_content"
			android:text="@string/fragment_add_recipe_public_recipe" />

		<com.google.android.material.switchmaterial.SwitchMaterial
			android:id="@+id/disable_comments"
			android:layout_width="0dp"
			android:layout_height="wrap_content"
			android:text="@string/fragment_add_recipe_disable_comments" />

		<Button
			android:id="@+id/save_recipe_button"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_margin="@dimen/margin_small"
			android:text="@string/fragment_add_recipe_save_button"
			app:layout_constraintEnd_toEndOf="parent"
			app:layout_constraintStart_toEndOf="@+id/clear_button"
			app:layout_constraintTop_toBottomOf="@+id/switches_flow" />

		<Button
			android:id="@+id/clear_button"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_margin="@dimen/margin_small"
			android:text="@string/fragment_add_recipe_clear_button"
			app:layout_constraintEnd_toStartOf="@+id/save_recipe_button"
			app:layout_constraintStart_toStartOf="parent"
			app:layout_constraintTop_toBottomOf="@+id/switches_flow" />
	</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>
