<?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"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:viewBindingIgnore="true">

    <com.google.android.material.card.MaterialCardView
        android:id="@+id/camerax_camera_parent"
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:cardCornerRadius="18dp"
        app:cardElevation="0dp"
        app:layout_constraintDimensionRatio="9:16"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintBottom_toBottomOf="parent">

        <androidx.camera.view.PreviewView
            android:id="@+id/camerax_camera"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_gravity="top"
            app:implementationMode="compatible" />
        <ImageView
            android:id="@+id/camerax_focus_indicator"
            android:layout_width="60dp"
            android:layout_height="60dp"
            android:src="@drawable/focus_indicator"
            android:scaleType="fitCenter"
            android:visibility="gone"/>
    </com.google.android.material.card.MaterialCardView>

    <FrameLayout
        android:id="@+id/camerax_controls_container"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintTop_toTopOf="@id/camerax_camera_parent" />

    <LinearLayout
        android:id="@+id/missing_permissions_container"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_gravity="center"
        android:layout_marginTop="-50dp"
        android:layout_marginHorizontal="20dp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        android:gravity="center"
        android:visibility="gone"
        android:orientation="vertical">

        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@drawable/permission_camera" />

        <TextView
            android:id="@+id/missing_permissions_text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:layout_marginTop="20dp"
            style="@style/Signal.Text.Body"
            android:text="@string/CameraXFragment_to_capture_photos_and_video_allow_camera" />

        <com.google.android.material.button.MaterialButton
            android:id="@+id/allow_access_button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="20dp"
            style="@style/Signal.Widget.Button.Large.Tonal"
            android:text="@string/CameraXFragment_allow_access" />

    </LinearLayout>

</androidx.constraintlayout.widget.ConstraintLayout>