<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/constraintLayout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:clipToPadding="false"
    android:paddingVertical="8dp"
    android:orientation="vertical">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/constraintLayout2"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@android:color/transparent"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0.0">

        <TextView
            android:id="@+id/data_label"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:paddingTop="8dp"
            android:layout_marginStart="8dp"
            android:text="@string/data_to_include_in_migration"
            android:textAppearance="?attr/textAppearanceTitleMedium"
            android:textColor="?attr/colorPrimary"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/migration_data_group"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/data_label">

            <androidx.constraintlayout.helper.widget.Flow
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                app:constraint_referenced_ids="mig_chapters,mig_categories,mig_tracking,mig_custom_cover,mig_extra"
                app:flow_horizontalBias="0"
                app:flow_horizontalGap="8dp"
                app:flow_horizontalStyle="packed"
                app:flow_verticalGap="2dp"
                app:flow_wrapMode="chain"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <CheckBox
                android:id="@+id/mig_chapters"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:checked="true"
                android:text="@string/chapters" />

            <CheckBox
                android:id="@+id/mig_categories"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:checked="true"
                android:text="@string/categories" />

            <CheckBox
                android:id="@+id/mig_tracking"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:checked="true"
                android:text="@string/track" />

            <CheckBox
                android:id="@+id/mig_custom_cover"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:checked="true"
                android:text="@string/custom_cover" />

            <CheckBox
                android:id="@+id/mig_extra"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:checked="true"
                android:text="@string/log_extra" />
        </androidx.constraintlayout.widget.ConstraintLayout>

        <View
            android:id="@+id/migration_data_divider"
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:layout_marginTop="4dp"
            android:background="?android:attr/divider"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/migration_data_group"/>

        <TextView
            android:id="@+id/options_label"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="16dp"
            android:layout_marginStart="8dp"
            android:text="@string/action_settings"
            android:textAppearance="?attr/textAppearanceTitleMedium"
            android:textColor="?attr/colorPrimary"
            app:layout_constraintStart_toStartOf="@+id/migration_data_group"
            app:layout_constraintTop_toBottomOf="@+id/migration_data_divider" />

        <RadioGroup
            android:id="@+id/sourceGroup"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginEnd="8dp"
            android:orientation="vertical"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="@+id/options_label"
            app:layout_constraintTop_toBottomOf="@+id/options_label">

            <RadioButton
                android:id="@+id/radioButton"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:paddingStart="0dp"
                android:paddingEnd="8dp"
                android:text="@string/use_first_source" />

            <RadioButton
                android:id="@+id/radioButton2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/use_most_chapters" />

        </RadioGroup>

        <View
            android:id="@+id/sourceGroup_divider"
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:layout_marginTop="4dp"
            android:background="?android:attr/divider"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/sourceGroup"/>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:paddingStart="16dp"
            android:paddingEnd="16dp"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/sourceGroup_divider">

            <com.google.android.material.materialswitch.MaterialSwitch
                android:id="@+id/use_smart_search"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="16dp"
                android:paddingHorizontal="16.dp"
                android:paddingVertical="16dp"
                android:text="@string/use_intelligent_search" />

            <com.google.android.material.materialswitch.MaterialSwitch
                android:id="@+id/extra_search_param"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:paddingHorizontal="16.dp"
                android:paddingVertical="16dp"
                android:text="@string/include_extra_search_parameter" />

            <EditText
                android:id="@+id/extra_search_param_text"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:ems="10"
                android:hint="@string/search_parameter"
                android:importantForAutofill="no"
                android:inputType="textPersonName"
                android:textSize="16sp" />

            <com.google.android.material.materialswitch.MaterialSwitch
                android:id="@+id/skip_step"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:paddingHorizontal="16.dp"
                android:paddingVertical="16dp"
                android:text="@string/skip_this_step_next_time" />

            <com.google.android.material.materialswitch.MaterialSwitch
                android:id="@+id/Hide_not_found_manga"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:layout_marginBottom="82dp"
                android:paddingHorizontal="16.dp"
                android:paddingVertical="16dp"
                android:text="@string/hide_not_found_entries" />

        </LinearLayout>

    </androidx.constraintlayout.widget.ConstraintLayout>

    <View
        android:id="@+id/migrate_btn_divider"
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:layout_marginBottom="12dp"
        android:background="?android:attr/divider"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintBottom_toTopOf="@id/migrate_btn" />

    <Button
        android:id="@+id/migrate_btn"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginEnd="16dp"
        android:layout_marginStart="16dp"
        android:layout_marginBottom="12dp"
        android:text="@string/action_migrate"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintBottom_toBottomOf="@id/constraintLayout2" />

</androidx.constraintlayout.widget.ConstraintLayout>
