<?php $__env->startSection("content"); ?>
<?php $__env->startSection("title","Add Permissions"); ?>

<div class="row">
    <div class="col-xl-12 col-lg-12">
        <div class="alert alert-success my-3" style="display:none;" id="success"></div>
        
        <div class="card">
            <div class="card-header">
                <h4 class="card-title mb-0">Add Permissions</h4>
            </div>
            
            <div class="card-body">
                <form accept-charset="utf-8" name="add-form" id="add-form">
                    <?php echo csrf_field(); ?>
                    <div class="row">
                        <div class="col-lg-6">
                            <div class="mb-3">
                                <label for="add-page" class="form-label">Page <span class="text-danger">*</span></label>
                                <input type="text" name="page" id="add-page" autocomplete="off" maxlength="255" value="" required class="form-control" placeholder="Page (e.g., roles, permissions)">
                                <small class="text-muted">This will automatically create 4 permissions: {page}-list, {page}-create, {page}-edit, {page}-delete</small>
                                <span class='text-danger' id='add-pageError'></span>
                            </div>
                        </div>

                        <div class="col-lg-6">
                            <div class="mb-3">
                                <label for="add-guard_name" class="form-label">Guard Name <span class="text-danger">*</span></label>
                                <input type="text" name="guard_name" id="add-guard_name" autocomplete="off" maxlength="255" value="web" required class="form-control" placeholder="Guard Name">
                                <span class='text-danger' id='add-guard_nameError'></span>
                            </div>
                        </div>
                    </div>
                    
                    <div class="alert alert-info">
                        <i class="ri-information-line me-1"></i>
                        <strong>Note:</strong> This will automatically create 4 permission records:
                        <ul class="mb-0 mt-2">
                            <li>{page}-list</li>
                            <li>{page}-create</li>
                            <li>{page}-edit</li>
                            <li>{page}-delete</li>
                        </ul>
                    </div>

                    <div class="p-3 mb-3 rounded">
                        <div class="row justify-content-end g-2">
                            <div class="col-lg-3">
                                <button type='submit' name='add-submit' id='add-submit' class='btn btn-outline-secondary w-100' data-args1='<?php echo e(url("/permissions-add")); ?>' data-args2='No' onclick='addUpdate(event, "add")'>
                                    <i class="ri-save-line"></i> Save 
                                </button>
                            </div>
                            <div class="col-lg-2">
                                <a href="<?php echo e(url('/admin/permissions')); ?>" class="btn btn-primary w-100">
                                    <i class="ri-close-circle-line"></i> Cancel
                                </a>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<?php $__env->stopSection(); ?>


<?php echo $__env->make("layouts.metor.admin", \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /Applications/MAMP/htdocs/test1/resources/views/permissions/create.blade.php ENDPATH**/ ?>