@extends('admin.layout.layout')
@section('title', 'Edit User')

@section('content')
    <!-- Content -->

    <div class="container-xxl flex-grow-1 container-p-y">
        <div class="row">
            <div class="col-md-6 d-flex justify-content-between mt-2 mb-2">
                <h4 class="fw-bold "><span class="text-muted fw-light"></span>Update User Detail</h4>
            </div>
        </div>
        <div class="card">
            <div class="card-body">
                @livewire('admin.update-user', array('id' => $id))
            </div>
        </div>
        
    </div>

@endsection
@section('script')
<script>
    document.addEventListener('DOMContentLoaded', function () {
        console.log("livewire init");

        Livewire.on('detail_updated', () => {
            console.log('Detail updated successfully');
            toastr.success('Detail updated successfully');
        });
    });
</script>
@endsection