@extends('layouts.app')

@section('page_title', 'User Management')

@section('content')
    @php
        $users = [
            ['id' => 1, 'username' => 'superadmin', 'firstName' => 'Maryse', 'lastName' => 'Howe', 'role' => 'Admin', 'email' => 'maryse.howe@qqq.com', 'status' => 'Inctive'],
            ['id' => 2, 'username' => 'superadmin1', 'firstName' => 'Joseph', 'lastName' => 'Sazon', 'role' => 'Admin', 'email' => 'mis.specialist@unioil.com', 'status' => 'Active'],
            ['id' => 3, 'username' => 'graxia', 'firstName' => 'Graxia', 'lastName' => 'Montino', 'role' => 'Admin', 'email' => 'business.analyst@unioil.com', 'status' => 'Inctive'],
            ['id' => 4, 'username' => 'cinerosimo', 'firstName' => 'Cine', 'lastName' => 'Rosimo', 'role' => 'Admin', 'email' => 'frosimo1@yopmail.com', 'status' => 'Active'],
            ['id' => 5, 'username' => 'graxia5', 'firstName' => 'Graxia', 'lastName' => 'Montino', 'role' => 'Admin', 'email' => 'business.analyst@unioil.com', 'status' => 'Inctive'],
            ['id' => 6, 'username' => 'graxia6', 'firstName' => 'Graxia', 'lastName' => 'Montino', 'role' => 'Admin', 'email' => 'business.analyst@unioil.com', 'status' => 'Inctive'],
            ['id' => 7, 'username' => 'graxia7', 'firstName' => 'Graxia', 'lastName' => 'Montino', 'role' => 'Admin', 'email' => 'business.analyst@unioil.com', 'status' => 'Active']
        ];
    @endphp

    @include('components.table-component', [
        'pageTitle' => 'User Management',
        'data' => $users,
        'columns' => [
            ['name' => 'Username', 'key' => 'username', 'sortable' => true],
            ['name' => 'First Name', 'key' => 'firstName', 'sortable' => true],
            ['name' => 'Last Name', 'key' => 'lastName', 'sortable' => true],
            ['name' => 'User Role', 'key' => 'role', 'sortable' => true],
            ['name' => 'Email', 'key' => 'email', 'sortable' => true],
            ['name' => 'Status', 'key' => 'status', 'sortable' => true]
        ],
        'actions' => ['edit', 'view', 'delete'],
        'showAddButton' => true,
        'addButtonUrl' => '/add-user',
        'showCheckboxes' => true,
        'showBatchDelete' => true,
        'showEditModal' => true,
        'showViewModal' => true
    ])
@endsection