<?php $__env->startSection('css'); ?>
	<style>
		.tabs-left,
		.tabs-right {
			border-bottom: none;
			padding-top: 2px;
		}

		.tabs-left {
			border-right: 1px solid #ddd;
		}

		.tabs-right {
			border-left: 1px solid #ddd;
		}

		.tabs-left>li,
		.tabs-right>li {
			float: none;
			margin-bottom: 2px;
		}

		.tabs-left>li {
			margin-right: -1px;
		}

		.tabs-right>li {
			margin-left: -1px;
		}
		ul li{
			margin-left: 30px
		}
		ul li.row-list{
			width: 335px !important;
			float: left
		}
		.tabs-left>li.active>a,
		.tabs-left>li.active>a:hover,
		.tabs-left>li.active>a:focus {
			border-bottom-color: #ddd;
			border-right-color: transparent;
		}

		.tabs-right>li.active>a,
		.tabs-right>li.active>a:hover,
		.tabs-right>li.active>a:focus {
			border-bottom: 1px solid #ddd;
			border-left-color: transparent;
		}

		.tabs-left>li>a {
			border-radius: 4px 0 0 4px;
			margin-right: 0;
			display: block;
		}

		.tabs-right>li>a {
			border-radius: 0 4px 4px 0;
			margin-right: 0;
		}
	</style>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
    <?php Fun::lang() ?>
	<div class="title-add">
		<div class="page-bar">
			<ul class="page-breadcrumb">
				<li> <a class="ng-binding" href="#"><i class="fa fa-dashboard"></i> Dashboard</a> </li>
				<li><a href="#">Role</a></li>
				<li><a href="#">create Role</a></li>
			</ul>
		</div>
	</div>
	<div class="page">
		<div class="top-content">
			<div class="row">
				<div class="col-sm-12 col-xs-12">
					<div class="title-page">
						<div class="pull-left">
							<h3>Create Role</h3>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-md-12">
				<div class="form-wrapper">
					<?php echo Form::open(array('route' => 'roles.store','method'=>'POST','id'=>'form_validate')); ?>

					<div class="row">
						<div style="width: 100%;float: left;">
							<div class="form-group col-sm-4 col-xs-12">
								<label class="required">Title</label>
								<?php echo Form::text('name', null, array('placeholder' => 'Title','class' => 'form-control','required')); ?>

								<span class="focus-border"></span>
							</div>
						</div>
					</div>
					<div class="col-md-12">
						<div class="col-md-12">
							<h3>Select Permission</h3>
							<hr />
							<div class="col-xs-9">
								<div class="tab-content">
									<?php $__currentLoopData = $prefixes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $prefix): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
										<div class="tab-pane <?php echo e(($key==0)?'active':''); ?>" id="<?php echo e($key); ?>-tab">
											<div class="col-sm-12 col-xs-12">
												<?php $__currentLoopData = $groups; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $j => $group): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
													<?php if($prefix->prefix_name==$group->prefix_name): ?>
														<ul>
															<label style="width: 100%;color: #003eff;margin-bottom:20px" class="checkbox-list">
																<input type="checkbox" class="main-box" id="<?php echo e($j); ?>-box" value="checked" name="checkbox_1[]">
																Check All <?php echo e($group->group_name); ?>

																<span class="checkmark"></span>
															</label>
															<?php $__currentLoopData = $permission; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value => $perm): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
																<?php if($perm->group_name == $group->group_name): ?>
																	<li class="row-list">
																		<label style="width: 100%;font-size: 14px" class="checkbox-list">
																			<input type="checkbox" name="permission[]" id="" value="<?php echo e($perm->id); ?>" class="name <?php echo e($j); ?>-box">
																			<?php echo e($perm->name); ?><span class="checkmark"></span>
																		</label>
																	</li>
																<?php endif; ?>
															<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
														</ul>
													<?php endif; ?>
												<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
											</div>
										</div>
									<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
								</div>
							</div>
							<div class="col-xs-3">
								<ul class="nav nav-tabs tabs-right sideways">
									<?php $__currentLoopData = $prefixes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $prefix): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
										<li class="<?php echo e(($index==0)?'active':''); ?>"><a href="#<?php echo e($index); ?>-tab" data-toggle="tab"><?php echo e($prefix->prefix_name); ?></a></li>
									<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
								</ul>
							</div>
						</div>

						<div class="col-sm-12 col-xs-12">
							<div class="form-group">
								<button type="submit" class="button_sm button_primary pull-right"><span class="fa fa-save"></span> Save</button>
								<button type="button" onClick="javascript:history.go(-1)" class="button_sm button_warning pull-right">
									<span class=" fa fa-arrow-circle-left"></span> Back</button>
							</div>
						</div>
						<?php echo Form::close(); ?>

					</div>
				</div>
			</div>
		</div>

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

		<?php $__env->startSection('js'); ?>
			<script type="text/javascript">
                $(document).on('change','.main-box',function(){
                    var id = $(this).attr('id');
                    if($(this).is(":checked")){
                        $("."+id).prop('checked', true);
                    }else{
                        $("."+id).prop('checked', false);
                    }
                });
			</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('adminlte::page', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>