@extends('Admin.master_page')
@section('small_title')
{{__("lable.setting")}}
@endsection

@section('content')



                <div class="page-content">
                    <div class="container-fluid">

                        <!-- start page title -->
                        <div class="row">
                            <div class="col-12">
                                <div class="page-title-box d-sm-flex align-items-center justify-content-between">
                                    <h4 class="mb-sm-0 font-size-18"> Edit </h4>

                                    <div class="page-title-right">
                                        <ol class="breadcrumb m-0">
                                            <li class="breadcrumb-item"><a href="{{route('dashboard.index')}}">Dashboard</a></li>
                                            <li class="breadcrumb-item active"> Setting</li>
                                        </ol>
                                    </div>

                                </div>
                            </div>
                            @if(Session::has('message'))
                      <div class="alert alert-info">{{ Session::get('message') }}</div>

@endif

                        </div>
                        <!-- end page title -->
                        <div>

                            <form method="post" action="{{ route('companies.update',['company'=>$company->id]) }}" enctype="multipart/form-data">
                                @csrf
                                @method('put')
                                <div class="col-lg-12">
                                    <h6 class="m-0 font-weight-bold text-primary pull-left" >Name </h6>
                                    <hr>

                                    <div class="input-group" style="margin-top: 15px;">
                                        <input type="text" value="{{$company->name}}" required name="name" class="form-control" placeholder="">
                                        @error('name')
                                        <span class="alert-danger">{{ $message }}</span>
                                        @enderror
                                    </div>
                                    <br>

                                    <h6 class="m-0 font-weight-bold text-primary pull-left" > Description  </h6>
                                <hr>

                                <div class="input-group" style="margin-top: 15px;">
                                    <textarea class="form-control" name="description" cols="20" rows="8">
                                        {{$company->description}}
                                    </textarea>
                                    @error('description')
                                    <span class="alert-danger">{{ $message }}</span>
                                    @enderror
                                </div>
                                <br>

                                <h6 class="m-0 font-weight-bold text-primary pull-left" >Dari Description  </h6>
                                <hr>

                                <div class="input-group" style="margin-top: 15px;">
                                    <textarea class="form-control" name="da_description" cols="20" rows="8" style="direction:rtl">
                                        {{$company->da_description}}
                                    </textarea>
                                    @error('da_description')
                                    <span class="alert-danger">{{ $message }}</span>
                                    @enderror
                                </div>
                                <br>

                                <h6 class="m-0 font-weight-bold text-primary pull-left" >Pashto Description  </h6>
                                <hr>

                                <div class="input-group" style="margin-top: 15px;">
                                    <textarea class="form-control" name="pa_description" cols="20" rows="8" style="direction: rtl">
                                        {{$company->pa_description}}
                                    </textarea>
                                    @error('pa_description')
                                    <span class="alert-danger">{{ $message }}</span>
                                    @enderror
                                </div>
                                <br>

                                    <h6 class="m-0 font-weight-bold text-primary pull-left" >Phone1</h6>
                                    <hr>

                                    <div class="input-group" style="margin-top: 15px;">
                                        <input type="phone" value="{{$company->phone1}}" required name="phone1" class="form-control" placeholder="">
                                        @error('phone1')
                                        <span class="alert-danger">{{ $message }}</span>
                                        @enderror
                                    </div>
                                    <br>

                                    <h6 class="m-0 font-weight-bold text-primary pull-left" >Phone2</h6>
                                    <hr>

                                    <div class="input-group" style="margin-top: 15px;">
                                        <input type="phone" value="{{$company->phone2}}"  name="phone2" class="form-control" placeholder="">
                                        @error('phone2')
                                        <span class="alert-danger">{{ $message }}</span>
                                        @enderror
                                    </div>
                                    <br>
                                    <h6 class="m-0 font-weight-bold text-primary pull-left" >Email 1</h6>
                                    <hr>

                                    <div class="input-group" style="margin-top: 15px;">
                                        <input type="email" value="{{$company->email1}}" required name="email1" class="form-control" placeholder="">
                                        @error('email1')
                                        <span class="alert-danger">{{ $message }}</span>
                                        @enderror
                                    </div>
                                    <br>

                                    <h6 class="m-0 font-weight-bold text-primary pull-left" >Email 2 (Product Order )</h6>
                                    <hr>

                                    <div class="input-group" style="margin-top: 15px;">
                                        <input type="email" value="{{$company->email2}}"  name="email2" class="form-control" placeholder="">
                                        @error('email2')
                                        <span class="alert-danger">{{ $message }}</span>
                                        @enderror
                                    </div>
                                    <br>
                                    <h6 class="m-0 font-weight-bold text-primary pull-left" >Location 1</h6>
                                    <hr>

                                    <div class="input-group" style="margin-top: 15px;">
                                        <input type="text" required name="location1" value="{{$company->location1}}" class="form-control" placeholder="">
                                        @error('location1')
                                        <span class="alert-danger">{{ $message }}</span>
                                        @enderror
                                    </div>
                                    <br>
                                    <h6 class="m-0 font-weight-bold text-primary pull-left" >Location 2</h6>
                                    <hr>

                                    <div class="input-group" style="margin-top: 15px;">
                                        <input type="text"  name="location2" class="form-control" value="{{$company->location2}}"  placeholder="">
                                        @error('location2')
                                        <span class="alert-danger">{{ $message }}</span>
                                        @enderror
                                    </div>
                                    <br>
                                    <h6 class="m-0 font-weight-bold text-primary pull-left" >Facebook</h6>
                                    <hr>

                                    <div class="input-group" style="margin-top: 15px;">
                                        <input type="text"  name="facebook" value="{{$company->facebook}}"  class="form-control" placeholder="https://www.facebook.com/your facebook">
                                        @error('facebook')
                                        <span class="alert-danger">{{ $message }}</span>
                                        @enderror
                                    </div>
                                    <br>
                                    <h6 class="m-0 font-weight-bold text-primary pull-left" > Twitter </h6>
                                    <hr>

                                    <div class="input-group" style="margin-top: 15px;">
                                        <input type="text"  name="twitter" class="form-control" value="{{$company->twitter}}"  placeholder="https://www.twitter.com/your twitter">
                                        @error('twitter')
                                        <span class="alert-danger">{{ $message }}</span>
                                        @enderror
                                    </div>
                                    <br>
                                    <h6 class="m-0 font-weight-bold text-primary pull-left" >Youtube</h6>
                                    <hr>

                                    <div class="input-group" style="margin-top: 15px;">
                                        <input type="text"  name="youtube" class="form-control" value="{{$company->youtube}}"  placeholder="https://www.youtube.com/your youtube">
                                        @error('youtube')
                                        <span class="alert-danger">{{ $message }}</span>
                                        @enderror
                                    </div>
                                    <br>

                                 <h6 class="m-0 font-weight-bold text-primary pull-left" >Instagram</h6>
                                <hr>

                                <div class="input-group" style="margin-top: 15px;">
                                    <input type="text"  name="instagram"  value="{{$company->instagram}}" class="form-control" placeholder="https://www.instagram.com/your instagram">
                                    @error('instagram')
                                    <span class="alert-danger">{{ $message }}</span>
                                    @enderror
                                </div>
                                <br>
                                 <h6 class="m-0 font-weight-bold text-primary pull-left" >Linkedin</h6>
                                <hr>

                                <div class="input-group" style="margin-top: 15px;">
                                    <input type="text"  name="linkedin"  value="{{$company->linkedin}}" class="form-control" placeholder="https://www.linkedin.com/your linkedin">
                                    @error('linkedin')
                                    <span class="alert-danger">{{ $message }}</span>
                                    @enderror
                                </div>
                                <br>


                                <div class="input-group" style="margin-top: 15px;">
                                    <div class="fileinput fileinput-new"data-provides="fileinput">
                                        <div class="fileinput-new img-thumbnail" style="width: 150px; height: 150px;">
                                           <input type="hidden" value="{{$company->logo}}" name="old_logo">
                                            <img src="{{ render_image_path($company->logo)}}"   alt="...">
                                        </div>
                                        <div class="fileinput-preview fileinput-exists img-thumbnail" style="max-width: 150px; max-height: 150px;"></div>
                                        <div class="mt-2">
                                            <span class="btn btn-outline-secondary btn-file"><span class="fileinput-new">   English Logo </span>

                                            <span class="fileinput-exists">Edit</span><input type="file"  name="logo"></span>
                                            <a href="#" class="btn btn-outline-secondary fileinput-exists"  data-dismiss="fileinput">Delete</a>
                                        </div>
                                        @error('logo')
                                        <span class="alert-danger">{{ $message }}</span>
                                        @enderror
                                    </div>

                                    <div class="fileinput fileinput-new"data-provides="fileinput">
                                        <div class="fileinput-new img-thumbnail" style="width: 150px; height: 150px;">
                                           <input type="hidden" value="{{$company->da_logo}}" name="da_old_logo">
                                            <img src="{{ render_image_path($company->da_logo)}}"   alt="...">
                                        </div>
                                        <div class="fileinput-preview fileinput-exists img-thumbnail" style="max-width: 150px; max-height: 150px;"></div>
                                        <div class="mt-2">
                                            <span class="btn btn-outline-secondary btn-file"><span class="fileinput-new">   Dari Logo </span>

                                            <span class="fileinput-exists">Edit</span><input type="file"  name="da_logo"></span>
                                            <a href="#" class="btn btn-outline-secondary fileinput-exists"  data-dismiss="fileinput">Delete</a>
                                        </div>
                                        @error('logo')
                                        <span class="alert-danger">{{ $message }}</span>
                                        @enderror
                                    </div>

                                                <div class="fileinput fileinput-new"data-provides="fileinput">
                                        <div class="fileinput-new img-thumbnail" style="width: 150px; height: 150px;">
                                           <input type="hidden" value="{{$company->footer_logo}}" style="background-color: #14467" name="old_footer_logo">
                                            <img src="{{ render_image_path($company->footer_logo)}}"   alt="..." style="background-color: #14467">
                                        </div>
                                        <div class="fileinput-preview fileinput-exists img-thumbnail" style="max-width: 150px; max-height: 150px;background-color: #14467" ></div>
                                        <div class="mt-2">
                                            <span class="btn btn-outline-secondary btn-file"><span class="fileinput-new">   Footer Logo </span>

                                            <span class="fileinput-exists">Edit</span><input type="file"  name="footer_logo"></span>
                                            <a href="#" class="btn btn-outline-secondary fileinput-exists"  data-dismiss="fileinput">Delete</a>
                                        </div>
                                        @error('footer_logo')
                                        <span class="alert-danger">{{ $message }}</span>
                                        @enderror
                                    </div>

                                                            <div class="fileinput fileinput-new"data-provides="fileinput">
                                        <div class="fileinput-new img-thumbnail" style="width: 150px; height: 150px;">
                                           <input type="hidden" value="{{$company->da_footer_logo}}" name="old_da_footer_logo">
                                            <img src="{{ render_image_path($company->da_footer_logo)}}"   alt="...">
                                        </div>
                                        <div class="fileinput-preview fileinput-exists img-thumbnail" style="max-width: 150px; max-height: 150px;background-color: #14467"></div>
                                        <div class="mt-2">
                                            <span class="btn btn-outline-secondary btn-file"><span class="fileinput-new">   Dari Footer Logo </span>

                                            <span class="fileinput-exists">Edit</span><input type="file"  name="da_footer_logo"></span>
                                            <a href="#" class="btn btn-outline-secondary fileinput-exists"  data-dismiss="fileinput">Delete</a>
                                        </div>
                                        @error('da_footer_logo')
                                        <span class="alert-danger">{{ $message }}</span>
                                        @enderror
                                    </div>

                                </div>
                                <br>

                            </div>

                                <input type="submit" value=" Save Changes" class=" btn btn-secondary">


                            </form>
                        </div>





</div>
<!-- container-fluid -->
</div>
<!-- End Page-content -->



@endsection




