<div class="row">
	<div class="card w-100">
		<div class="card-footer">
			<h4>
				<i class="fas fa-globe-americas"></i>
				Países
			</h4>
		</div>
		<div class="card-body" ng:show="spinner">
			<h4 class="text-center">
				<i class="fa fa-spin fa-spinner"></i>
				Cargando
			</h4>
		</div>
		<div class="card-body" ng:show="!spinner">
			<div class="row">
				<div class="col-xs-12 col-sm-6">
					<button class="btn btn-primary" ng:click="openModal(1)">
						<i class="fas fa-plus"></i>
						Agregar País
					</button>
				</div>
				<div class="col-xs-12 col-sm-6">
					<input type="text" class="form-control" placeholder="Buscar" ng:model="search">
				</div>
			</div>
			<br>
			<div class="table-responsive-vertical">
				<div class="row">
					<div class="col-xs-12 col-sm-4" ng:repeat="pais in paises | filter: search">
						<div class="card">
							<div class="card-body">
								<h2 class="card-title" ng:bind="pais.nombre"></h2>
								<h6>Abreviatura: <strong ng:bind="pais.abreviatura"></strong></h6>
								<h6>Nacionalidad: <strong ng:bind="pais.nacionalidad"></strong></h6>
							</div>
							<div class="card-footer">
								<div class="text-center">
									<button class="btn btn-warning" ng:click="openModal(2,pais)">
										<i class="fa fa-edit"></i>
									</button>
									<button class="btn btn-danger" ng:click="delete(pais)">
										<i class="fa fa-trash"></i>
									</button>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

<div class="modal fade" id="modal_edit" tabindex="-1" role="dialog">
	<div class="modal-dialog" role="document">
	    <div class="modal-content">
	      	<div class="modal-header">
	        	<h5 class="modal-title" ng:bind="modal.title"></h5>
	        	<button type="button" class="close" data-dismiss="modal" aria-label="Close">
	          		<span aria-hidden="true">&times;</span>
	        	</button>
	      	</div>
	      	<div class="modal-body">
	        	<form ng:submit="save()" id="form_edit" name="form_edit">
	        		<fieldset>
	        			<div class="form-group">
	        				<label for="">Nombre</label>	
	        				<input type="text" class="form-control" name="nombre" ng:model="modal.model.nombre" required>
	        				<small ng:show="modal.fails.nombre" ng:repeat="fail in modal.fails.nombre" ng:bind="fail" class="text-danger"></small>
	        			</div>
	        			<div class="form-group">
	        				<label for="">Abreviatura</label>	
	        				<input type="text" class="form-control" name="abreviatura" ng:model="modal.model.abreviatura" maxlength="3" required>
	        				<small ng:show="modal.fails.abreviatura" ng:repeat="fail in modal.fails.abreviatura" ng:bind="fail" class="text-danger"></small>
	        			</div>
	        			<div class="form-group">
	        				<label for="">Nacionalidad</label>	
	        				<input type="text" class="form-control" name="nacionalidad" ng:model="modal.model.nacionalidad" required>
	        				<small ng:show="modal.fails.nacionalidad" ng:repeat="fail in modal.fails.nacionalidad" ng:bind="fail" class="text-danger"></small>
	        			</div>
	        		</fieldset>
	        	</form>
		    </div>
		    <div class="modal-footer">
	        	<button type="submit" class="btn btn-info btn-block" form="form_edit" ng:disabled="modal.spinner">
	        		<any ng:show="!modal.spinner">Guardar Datos</any>
	        		<any ng:show="modal.spinner">
	        			<i class="fa fa-spin fa-spinner"></i>
	        			Guardando
	        		</any>
	        	</button>
	      	</div>
	    </div>
	</div>
</div>