<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2024 The Android Open Source Project

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

         http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->
<androidx.constraintlayout.motion.widget.MotionLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/picker_motion_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:layoutDescription="@xml/customization_picker_layout_scene">

    <FrameLayout
        android:id="@+id/preview_header"
        android:layout_width="0dp"
        android:layout_height="@dimen/customization_picker_preview_header_expanded_height"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent">

        <androidx.viewpager2.widget.ViewPager2
            android:id="@+id/preview_pager"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />
    </FrameLayout>

    <androidx.core.widget.NestedScrollView
        android:id="@+id/bottom_scroll_view"
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:layout_constraintTop_toBottomOf="@+id/preview_header"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintBottom_toBottomOf="parent">

        <androidx.constraintlayout.motion.widget.MotionLayout
            android:id="@+id/customization_option_container"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingHorizontal="@dimen/customization_option_container_horizontal_padding"
            app:layoutDescription="@xml/customization_option_container_layout_scene">

            <LinearLayout
                android:id="@+id/lock_customization_option_container"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:showDividers="middle"
                android:divider="@drawable/customization_option_entry_divider"
                android:orientation="vertical" />

            <LinearLayout
                android:id="@+id/home_customization_option_container"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:showDividers="middle"
                android:divider="@drawable/customization_option_entry_divider"
                android:orientation="vertical" />
        </androidx.constraintlayout.motion.widget.MotionLayout>
    </androidx.core.widget.NestedScrollView>

    <!-- Guideline for the preview in the secondary screen -->
    <androidx.constraintlayout.widget.Guideline
        android:id="@+id/preview_guideline_in_secondary_screen"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        app:layout_constraintGuide_end="0dp" />

    <FrameLayout
        android:id="@+id/customization_picker_bottom_sheet"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toBottomOf="parent" />
</androidx.constraintlayout.motion.widget.MotionLayout>
