<?php

$idioma = "es";
if (isset($_COOKIE["idioma"])) {
    $idioma = isset($_COOKIE["idioma"]) ? $_COOKIE["idioma"] : "es";
}

?>
<div id="mainTwo" v-cloak>

	<div class="animated fadeIn">
		<div class="col s12 card-panel white" style="margin-top: 75px;">
			<h4 id="InGroupstitle">{{traducirFrase("Grupos de entrada")}}</h4>

			<!--Tabla de registros-->
			<br>
			<table-dialvox :headers="headers" :data="registros" <?php if ($_SESSION["Grupo"] == GRUPO_ADMINS || $_SESSION["Grupo"] == GRUPO_SUPERVISORES) {?> <?php if (isset($_SESSION["allowEncuestas"]) && $_SESSION["allowEncuestas"] == 1) {?> :options="optionsConEncuesta" @polls="assoc" <?php }?> :options="options" disabled="Activo" <?php }?> :loading="loading" @delete="del($event)" @edit="edit($event)" @download="download($event)"  @disable="disable($event)" @search="texto = $event" @campaign="abrirCampanas" @users="abrirUsuarios" >

			</table-dialvox>
			<br>
			<pagination-dialvox v-model="pagina" :count="cuenta"></pagination-dialvox>
			<br>
			<?php if ($_SESSION["Grupo"] == GRUPO_ADMINS) {?>
				<div class="center" id="botonCrear">
					<a class="waves-effect waves-light btn blue lighten-2 " href="#" @click.prevent="toggle('add')">{{traducirFrase("Nuevo grupo de entrada")}}</a>
				</div>
			<?php }?>

			<ul class="pagination center" id='paginacion'>

			</ul>
		</div>
	</div>
	<?php require_once "modals" . DIRECTORY_SEPARATOR . "add.php";?>
	<?php require_once "modals" . DIRECTORY_SEPARATOR . "edit.php";?>
	<?php require_once "modals" . DIRECTORY_SEPARATOR . "report.php";?>
	<?php require_once "modals" . DIRECTORY_SEPARATOR . "campaigns.php";?>
	<?php require_once "modals" . DIRECTORY_SEPARATOR . "users.php";?>
	<?php require_once "modals" . DIRECTORY_SEPARATOR . "polls.php";?>
</div>
<!-- END MAIN -->
<!-- ================================================
    Scripts
    ================================================ -->
<?php require_once "script.php";?>
