@extends('layouts.dashboard')

@section('content')

	<?php
        $total_task     = 0;
        $total_staff    = 0;
        $total_sub      = 0;
    ?>
<!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
	  <div class="container-full">
		<!-- Content Header (Page header) -->	  
		<div class="content-header">
			<div class="d-flex align-items-center">
				<div class="me-auto">
					<h3 class="page-title">Site Setting</h3>
					<div class="d-inline-block align-items-center">
						<nav>
							<ol class="breadcrumb">
								<li class="breadcrumb-item"><a href="#"><i class="mdi mdi-home-outline"></i></a></li>
								<li class="breadcrumb-item" aria-current="page">Extra</li>
								<li class="breadcrumb-item active" aria-current="page">Site Setting</li>
							</ol>
						</nav>
					</div>
				</div>
				
			</div>
		</div>

		<!-- Main content -->
		<section class="content">

		  <div class="row">
			<div class="col-12 col-lg-7 col-xl-8">

				<div class="box">
	                @include('layouts.flash-message')
	                @if ($errors->any())
	                    <div class="alert alert-danger">
	                        <strong>Whoops!</strong> There were some problems with your input.<br><br>
	                        <ul>
	                            @foreach ($errors->all() as $error)
	                                <li>{{ $error }}</li>
	                            @endforeach
	                        </ul>
	                    </div>
	                @endif
	                <!-- /.box-header -->
	                <div class="box-body">
	                	<div class="box no-shadow">		
							<form class="form-horizontal form-element col-12" action="{{ route('site.setting.update', $SiteSetting->id) }}" method="post" enctype="multipart/form-data">
								@csrf
								  <div class="form-group row">
									<label for="inputName" class="col-sm-4 form-label">Name</label>

									<div class="col-sm-8">
									  <input type="text" class="form-control" id="inputName" name="name" placeholder="" value="{{ $SiteSetting->site_name }}">
									</div>
								  </div>
								  
								  <div class="form-group row">
									<label for="inputName" class="col-sm-4 form-label">Site Email</label>

									<div class="col-sm-8">
									  <input type="email" class="form-control" id="inputName" name="site_email" placeholder="" value="{{ $SiteSetting->site_email }}">
									</div>
								  </div>
								  
								  <div class="form-group row">
									<label for="inputName" class="col-sm-4 form-label">GST Number</label>

									<div class="col-sm-8">
									  <input type="text" class="form-control" id="inputName" name="gst_number" placeholder="" value="{{ $SiteSetting->gst_number }}">
									</div>
								  </div>
								  
								  <div class="form-group row">
									<label for="inputName" class="col-sm-4 form-label">Discount Percentage</label>

									<div class="col-sm-8">
									  <input type="text" class="form-control" id="inputName" name="discount_percentage" placeholder="" value="{{ $SiteSetting->discount_percentage }}">
									</div>
								  </div>
								  
								  {{-- <div class="form-group row">
									<label for="inputEmail" class="col-sm-2 form-label">Site Logo</label>

									<div class="col-sm-10">
									  <input type="file" class="form-control" id="inputEmail" name="site_logo" placeholder="">
									</div>
									@if($SiteSetting->site_logo)
										<input type="hidden" name="old_site_logo" value="{{ $SiteSetting->site_logo }}">
									@endif
								  </div> --}}
								  <div class="form-group row">
									<label for="inputPhone" class="col-sm-4 form-label">Phone</label>

									<div class="col-sm-8">
									  <input type="tel" class="form-control" id="inputPhone" name="phone" placeholder="" value="{{ $SiteSetting->site_number }}">
									</div>
								  </div>
								  
								  <!-- <div class="form-group row">
									<div class="ms-auto col-sm-10">
									  <div class="checkbox">
										<input type="checkbox" id="basic_checkbox_1" checked="">
										<label for="basic_checkbox_1"> I agree to the</label>
										  &nbsp;&nbsp;&nbsp;&nbsp;<a href="#">Terms and Conditions</a>
									  </div>
									</div>
								  </div> -->
								  <div class="form-group row">
									<div class="col-sm-10">
										<input type="submit" name="submit" class="btn btn-primary" value="Submit">
									  <!-- <button type="submit" class="btn btn-success">Submit</button> -->
									</div>
								  </div>
								</form>
							</div>
						</div>
	                </div>
	            </div>
				
			  
			<!-- /.col -->		

			  <div class="col-12 col-lg-5 col-xl-4">
				 {{-- <div class="box box-widget widget-user">
					<!-- Add the bg color to the header using any of the bg-* classes -->
					<div class="widget-user-header bg-img bbsr-0 bber-0" style="background: url('../admin/images/gallery/full/10.jpg') center center;" data-overlay="5">
					  <h3 class="widget-user-username text-white">{{ $user->name }}</h3>
					  <!-- <h6 class="widget-user-desc text-white">Designer</h6> -->
					</div>
					<div class="widget-user-image">
					@if($user->profile_picture)
					  <img class="rounded-circle" src="<?php echo url('');?>/public/profile/{{$user->profile_picture}}" alt="User Avatar">
					@else
					<img class="rounded-circle" src="<?php echo url('');?>/public/admin_assets/images/user3-128x128.jpg" alt="User Avatar">
					@endif
					</div>
					
				  </div> --}}
				  {{-- <div class="box">
					<div class="box-body box-profile">            
					  <div class="row">
						<div class="col-12">
							<div>
								<p>Email :<span class="text-gray ps-10">{{ $user->email }}</span> </p>
								<p>Phone :<span class="text-gray ps-10">{{ $user->phone }}</span></p>
								<p>Address :<span class="text-gray ps-10">{{ $user->address }} @if($user->city), @endif {{ $user->city }}@if($user->state), @endif {{ $user->state }} @if($user->country), @endif {{ $user->country }} @if($user->zip_code) - @endif {{ $user->zip_code }}</span></p>
							</div>
						</div>
					  </div>
					</div>
					<!-- /.box-body -->
				  </div> --}}

			  </div>

		  </div>
		  <!-- /.row -->

		</section>
		<!-- /.content -->
	  </div>
  </div>
  <!-- /.content-wrapper -->

@endsection