@extends('layout.index', [
	'title' => __('Role.title'),
	'subtitle' => __('Role.list'),
	'breadcrumb' => [
		__('Role.title') => 'Admin.Core.Auth.Role.index',
	]
])

@include('load.form.select2')

@section('content')
	@component('components.card')
		@include('components.datatable', ['route' => route('Admin.Core.Auth.Role.index'), 'model' => 'roles', 'callback' => 'handleRoleActive();'])
	@endcomponent

	@component('components.layout.modal-filters', ['title' => 'Filters', 'id' => 'modal-roles-filters'])
		@include('admin.Core.Auth.Role.partials.filters')
	@endcomponent
@endsection

@include('load.form.toggle')

@push('js')
	<script>
		function handleRoleActive() {
			initToggle("{{ route('Admin.Core.Auth.Role.toggleActive') }}");
		}
	</script>
@endpush
