@extends('layouts.app')

@section('title',"Configuracion del sistema ")

@section('content')
<div class="response-data" style="display: none;"></div>

<div class="card">
	<div class="card-header header-elements-inline">
		<h5 class="card-title">Configuracion del sistema </h5>
		<div class="header-elements">
			<div class="list-icons">
        		<a class="list-icons-item" data-action="collapse"></a>
        		<a class="list-icons-item" data-action="reload"></a>
        		<a class="list-icons-item" data-action="remove"></a>
        	</div>
    	</div>
	</div>
	<div class="card-body mt-2">
		<div class="row">
			<div class="col-12">
				<form action="{{ url('config') }}" method="post" onsubmit="updateDB(this); return false">
					<input type="hidden" name="action" value="reloadapp">

					<button class="btn btn-primary"><i class="icon-reload-alt "></i> Restablacer app</button>
				</form>
			</div>
		</div>
	</div>
</div>
<div class="card">
	<div class="card-header header-elements-inline">
		<h5 class="card-title">Configuracion de Email</h5>
		<div class="header-elements">
			<div class="list-icons">
        		<a class="list-icons-item" data-action="collapse"></a>
        		<a class="list-icons-item" data-action="reload"></a>
        		<a class="list-icons-item" data-action="remove"></a>
        	</div>
    	</div>
	</div>
	<div class="card-body mt-2">
		<div class="response-mail" style="display: none;">
			

		</div>

		<div class="row">
			<div class="col-12 col-sm-12 col-md-6 col-lg-6 col-xl-6 ">
				<div class="fb contentform">
					<div class="alert alert-info">
						Api Mail
					</div>
					<form action="{{ url('config') }}" method="post" onsubmit="updateDB(this); return false">
						<input type="hidden" name="action" value="mail">
						<div class="form-group">
							<label for="">Driver:</label>
							<input type="text" name="mail[]" value="{{ env('MAIL_DRIVER') }}" class="form-control" required="" placeholder="Driver email">
						</div>
						<div class="form-group">
							<label for="">Host:</label>
							<input type="text" name="mail[]" value="{{ env('MAIL_HOST') }}" class="form-control" required="" placeholder="Host email">
						</div>
						<div class="form-group">
							<label for="">Puerto:</label>
							<input type="text" name="mail[]" value="{{ env('MAIL_PORT') }}" class="form-control" required="" placeholder="Puerto Email">
						</div>
						<div class="form-group">
							<label for="">Username:</label>
							<input type="text" name="mail[]" value="{{ env('MAIL_USERNAME') }}" class="form-control" required="" placeholder="Username emai"/>
						</div>
						<div class="form-group">
							<label for="">Password:</label>
							<input type="text" name="mail[]" value="{{ env('MAIL_PASSWORD') }}" class="form-control" required="" placeholder="Password">
						</div>
						<div class="form-group">
							<label for="">Encriptacion:</label>
							<input type="text" name="mail[]" value="{{ env('MAIL_ENCRYPTION') }}" class="form-control" required="" placeholder="Encriptacion">
						</div>
						<div class="row">
							<div class="col-12 text-center">
								 <button class="btn btn-primary"><i class="icon-rotate-cw2 "></i> Actualizar</button>
							</div>
						</div>
					</form>
				</div>
			</div>
			<div class="col-12 col-sm-12 col-md-6 col-lg-6 col-xl-6 ">
				<div class="form-group">
					<form action="{{ url('email') }}" method="post" onsubmit="emailsend(this); return false">
						<input type="hidden" name="action" value="test">
						<label for="">Email:</label>
						<input type="text" name="to" value="" class="form-control" required="" placeholder="Correo a enviar">
						<br/>
						<button class="btn btn-primary">Probar</button>
					</form>
				</div>
			</div>
		</div>
	</div>
</div>

<div class="card">
	<div class="card-header header-elements-inline">
		<h5 class="card-title">Configuracion Sincronizacion de  articulos wordpress</h5>
		<div class="header-elements">
			<div class="list-icons">
        		<a class="list-icons-item" data-action="collapse"></a>
        		<a class="list-icons-item" data-action="reload"></a>
        		<a class="list-icons-item" data-action="remove"></a>
        	</div>
    	</div>
	</div>
	<div class="card-body mt-2">
		<div class="response-automattic" style="display: none;">
			

		</div>

		<div class="row">
			<div class="col-12 col-sm-12 col-md-6 col-lg-6 col-xl-6 ">
				<div class="fb contentform">
					<div class="alert alert-info">
						Api wordpress
					</div>
					<form action="{{ url('config') }}" method="post" onsubmit="updateDB(this); return false">
						<input type="hidden" name="action" value="automattic">
						<div class="form-group">
							<label for="">Clave CK</label>
							<input type="text" name="automattic[]" value="{{ env('automattic_ck') }}" class="form-control" required="" placeholder="CK Nº *******">
						</div>
						<div class="form-group">
							<label for="">Clave CS</label>
							<input type="text" name="automattic[]" value="{{ env('automattic_cs') }}" class="form-control" required="" placeholder="Client Nº *******">
						</div>
						<div class="form-group">
							<label for="">Url de  wordpress</label>
							<input type="text" name="automattic[]" value="{{ env('automattic_url') }}" class="form-control" required="" placeholder="Url http://">
						</div>
						<div class="row">
							<div class="col-12 text-center">
								 <button class="btn btn-primary"><i class="icon-rotate-cw2 "></i> Actualizar</button>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
</div>

<div class="card">
	<div class="card-header header-elements-inline">
		<h5 class="card-title">Configuracion login Gmail y Facebook</h5>
		<div class="header-elements">
			<div class="list-icons">
        		<a class="list-icons-item" data-action="collapse"></a>
        		<a class="list-icons-item" data-action="reload"></a>
        		<a class="list-icons-item" data-action="remove"></a>
        	</div>
    	</div>
	</div>
	<div class="card-body mt-2">
		<div class="response-apis" style="display: none;">
			

		</div>

		<div class="row">
			<div class="col-12 col-sm-12 col-md-6 col-lg-6 col-xl-6 ">
				<div class="fb contentform">
					<div class="alert alert-info">
						<i class="icon-facebook2 "></i> Api Facebook
					</div>
					<form action="{{ url('config') }}" method="post" onsubmit="updateDB(this); return false">
						<input type="hidden" name="action" value="social">
						<input type="hidden" name="tipe" value="facebook">
						<div class="form-group">
							<label for="">Facebook ID</label>
							<input type="text" name="apisocial[]" value="{{ env('FACEBOOK_ID') }}" class="form-control" required="" placeholder="ID *******">
						</div>
						<div class="form-group">
							<label for="">Facebook Client</label>
							<input type="text" name="apisocial[]" value="{{ env('FACEBOOK_SECRET') }}" class="form-control" required="" placeholder="Client Nº *******">
						</div>
						<div class="form-group">
							<label for="">Facebook Redirect</label>
							<input type="text" name="apisocial[]" value="{{ env('FACEBOOK_REDIRECT') }}" class="form-control" required="" placeholder="Url http://">
						</div>
						<div class="row">
							<div class="col-12 text-center">
								 <button class="btn btn-primary"><i class="icon-reload-alt "></i> Actualizar</button>
							</div>
						</div>
					</form>
				</div>
			</div>
			<div class="col-12 col-sm-12 col-md-6 col-lg-6 col-xl-6 ">
				<div class="sc contentform">
					<div class="alert alert-warning">
						<i class="icon-google-plus2 "></i> Api Google
					</div>
					<form action="{{ url('config') }}" method="post" onsubmit="updateDB(this); return false">
						<input type="hidden" name="action" value="social">
						<input type="hidden" name="tipe" value="google">
						<div class="form-group">
							<label for="">Google ID</label>
							<input type="text" name="apisocial[]" value="{{ env('GOOGLE_CLIENT_ID') }}" class="form-control" required="" placeholder="ID *******">
						</div>
						<div class="form-group">
							<label for="">Google Client</label>
							<input type="text" name="apisocial[]" value="{{ env('GOOGLE_CLIENT_SECRET') }}" class="form-control" required="" placeholder="Client Nº *******">
						</div>
						<div class="form-group">
							<label for="">Google Redirect</label>
							<input type="text" name="apisocial[]" value="{{ env('GOOGLE_REDIRECT') }}" class="form-control" required="" placeholder="Url http://">
						</div>
						<div class="row">
							<div class="col-12 text-center">
								 <button class="btn btn-primary"><i class="icon-rotate-cw2 "></i> Actualizar</button>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
</div>

	@section('scripts')
	<script src="{!! asset('assets/views_functions/install.js') !!}"></script>
	<script src="{!! asset('assets/views_functions/config.js') !!}"></script>
	@endsection
@endsection