<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.example.absenkuv3.camerax.CameraxActivity">

    <androidx.camera.view.PreviewView
        android:id="@+id/viewFinder"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <!-- Toolbar -->
    <androidx.appcompat.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="56dp"
        android:background="@android:color/black"
        android:titleTextColor="@android:color/white"
        android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
        app:navigationIcon="@drawable/ic_arrow_back"
        app:navigationIconTint="@android:color/white"
        app:layout_constraintTop_toTopOf="parent" />

    <!-- TextView untuk header -->
    <TextView
        android:id="@+id/headerText"
        android:layout_width="match_parent"
        android:layout_height="56dp"
        android:text="Ini Debug Text"
        android:textSize="20sp"
        android:textColor="@android:color/white"
        android:background="@android:color/black"
        android:gravity="center"
        app:layout_constraintTop_toBottomOf="@id/toolbar"
        app:layout_constraintStart_toStartOf="parent"
        app:navigationIcon="@drawable/ic_arrow_back"
        app:navigationIconTint="@android:color/white"
        app:layout_constraintEnd_toEndOf="parent"/>

    <!-- Tombol Ambil Foto -->
    <ImageButton
        android:id="@+id/captureImage"
        android:background="@drawable/round_button"
        android:layout_width="60dp"
        android:layout_height="60dp"
        android:layout_marginBottom="16dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:srcCompat="@drawable/baseline_camera_alt_24" />

    <!-- Tombol Ganti Kamera -->
    <ImageButton
        android:id="@+id/switchCamera"
        android:layout_width="40dp"
        android:layout_height="40dp"
        android:layout_marginStart="16dp"
        android:background="@drawable/round_button"
        app:layout_constraintBottom_toBottomOf="@+id/captureImage"
        app:layout_constraintStart_toEndOf="@+id/captureImage"
        app:layout_constraintTop_toTopOf="@+id/captureImage"
        app:srcCompat="@drawable/baseline_cameraswitch_24" />

</androidx.constraintlayout.widget.ConstraintLayout>
