@extends('layouts.master')

@section('title') @lang('translation.Add_Asset') @endsection

@section('css')
<!-- select2 css -->
<link href="{{ URL::asset('/assets/libs/select2/select2.min.css') }}" rel="stylesheet" type="text/css" />

<!-- dropzone css -->
<link href="{{ URL::asset('/assets/libs/dropzone/dropzone.min.css') }}" rel="stylesheet" type="text/css" />
@endsection

@section('content')

@component('components.breadcrumb')
@slot('li_1') Ecommerce @endslot
@slot('title') Settings @endslot
@endcomponent


<form  class="needs-validation" id="settings_form" action="{{ route('settings.store') }}" method="post" enctype="multipart/form-data" novalidate>
@csrf
    <div class="row">
        <div class="col-12">
            <div class="card">
                <div class="card-body">

                    <h4 class="card-title">Settings</h4>
                    

                    <!-- Nav tabs -->
                    <ul class="nav nav-tabs" role="tablist">
                        <li class="nav-item">
                            <a class="nav-link active" data-bs-toggle="tab" href="#site_settings" role="tab">
                                <span class="d-block d-sm-none"><i class="fas fa-home"></i></span>
                                <span class="d-none d-sm-block">Site Settings</span>
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" data-bs-toggle="tab" href="#email_settings" role="tab">
                                <span class="d-block d-sm-none"><i class="far fa-user"></i></span>
                                <span class="d-none d-sm-block">Email Settings</span>
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" data-bs-toggle="tab" href="#web_settings" role="tab">
                                <span class="d-block d-sm-none"><i class="far fa-envelope"></i></span>
                                <span class="d-none d-sm-block">Web Settings</span>
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" data-bs-toggle="tab" href="#location" role="tab">
                                <span class="d-block d-sm-none"><i class="fas fa-cog"></i></span>
                                <span class="d-none d-sm-block">Location</span>
                            </a>
                        </li>
                    </ul>

                    <!-- Tab panes -->
                    <div class="tab-content p-3 text-muted">
                        <div class="tab-pane active" id="site_settings" role="tabpanel">
                            <div class="col-lg-6">
                                <div class="mb-3">
                                    <label for="site_name" class="form-label">Site Name</label>
                                    <input type="text" name="site_name" class="form-control" id="site_name" placeholder="Enter Your First Name" value="{{ $settings['site_name']['value']}}" />
                                    <div id="first_name_errors" class="invalid-feedback">
                                    </div>
                                </div>
                                <div class="mb-3">
                                    <label for="site_title" class="form-label">Site Title</label>
                                    <input type="text" name="site_title" class="form-control" id="site_title" placeholder="Enter Your First Name" value="{{ $settings['site_title']['value']}}" />
                                    <div id="first_name_errors" class="invalid-feedback">
                                    </div>
                                </div>
                                <div class="mb-3">
                                    <label for="site_url" class="form-label">Site Url</label>
                                    <input type="text" name="site_url" class="form-control" id="site_url" placeholder="Enter Your First Name" value="{{ $settings['site_url']['value']}}" />
                                    <div id="first_name_errors" class="invalid-feedback">
                                    </div>
                                </div>
                                <div class="mb-3">
                                    <label for="site_logo" class="form-label">Site Lgogo</label>
                                    <input type="file" name="site_logo" class="form-control" id="site_logo" />
                                    <img src="{{ $settings['site_logo']['value'] }}" />
                                </div>
                                <div class="mb-3">
                                    <label for="site_icon" class="form-label">Site Icon</label>
                                    <input type="file" name="site_icon" class="form-control" id="site_icon" />
                                    <img src="{{ $settings['site_icon']['value'] }}" />
                                </div>
                            </div>
                        </div>
                        <div class="tab-pane" id="email_settings" role="tabpanel">
                            <div class="col-lg-6">
                                <div class="mb-3">
                                    <label for="smtp_host" class="form-label">Host Name</label>
                                    <input type="text" name="smtp_host" class="form-control" id="smtp_host" placeholder="Enter Your Host Name" value="{{ $settings['smtp_host']['value']}}" />
                                    <div id="smtp_host_errors" class="invalid-feedback">
                                    </div>
                                </div>
                                <div class="mb-3">
                                    <label for="smtp_user" class="form-label">SMTP Username</label>
                                    <input type="text" name="smtp_user" class="form-control" id="smtp_user" placeholder="Enter Your SMTP Username" value="{{ $settings['smtp_user']['value']}}" />
                                    <div id="smtp_user_errors" class="invalid-feedback">
                                    </div>
                                </div>
                                <div class="mb-3">
                                    <label for="smtp_password" class="form-label">SMTP Password</label>
                                    <input type="text" name="smtp_password" class="form-control" id="smtp_password" placeholder="Enter Your SMTP Password" value="{{ $settings['smtp_password']['value']}}" />
                                    <div id="smtp_password_errors" class="invalid-feedback">
                                    </div>
                                </div>
                                <div class="mb-3">
                                    <label for="smtp_port" class="form-label">SMTP Port</label>
                                    <input type="text" name="smtp_port" class="form-control" id="smtp_port" placeholder="Enter Your SMTP Port" value="{{ $settings['smtp_port']['value']}}" />
                                    <div id="smtp_port_errors" class="invalid-feedback">
                                    </div>
                                </div>
                                
                                <div class="mb-3">
                                    <label for="contact_us_email" class="form-label">Contact Us Receive Email</label>
                                    <input type="text" name="contact_us_email" class="form-control" id="contact_us_email" placeholder="Enter Your Contact Us Receive Email" value="{{ $settings['contact_us_email']['value']}}" />
                                    <div id="contact_us_email_errors" class="invalid-feedback">
                                    </div>
                                </div>
                                <div class="mb-3">
                                    <label for="admin_email" class="form-label">Admin Email</label>
                                    <input type="text" name="admin_email" class="form-control" id="admin_email" placeholder="Enter Your First Name" value="{{ $settings['admin_email']['value']}}" />
                                    <div id="admin_email_errors" class="invalid-feedback">
                                    </div>
                                </div>
                                <div class="mb-3">
                                    <label for="site_email_logo" class="form-label">Email Logo</label>
                                    <input type="file" name="site_email_logo" class="form-control" id="site_email_logo" />
                                    <img src="{{ $settings['site_email_logo']['value'] }}" />
                                </div>
                            </div>
                        </div>
                        <div class="tab-pane" id="web_settings" role="tabpanel">
                        <div class="row">
                            <div class="col-lg-6">
                                <div class="mb-3">
                                    <label for="site_copyright" class="form-label">Site Copy Right text</label>
                                    <input type="text" name="site_copyright" class="form-control" id="site_copyright" placeholder="Enter Your Host Name" value="{{ $settings['site_copyright']['value']}}" />
                                    <div id="smtp_host_errors" class="invalid-feedback">
                                    </div>
                                </div>
                                <div class="mb-3">
                                    <label for="default_lang" class="form-label">Default Language</label>
                                    <input type="text" name="default_lang" class="form-control" id="default_lang" placeholder="Enter Your SMTP Username" value="{{ $settings['default_lang']['value']}}" />
                                </div>
                                <div class="mb-3">
                                    <label for="currency" class="form-label">Currency Symbol</label>
                                    <input type="text" name="currency" class="form-control" id="currency" placeholder="Enter Your SMTP Username" value="{{ $settings['currency']['value']}}" />
                                </div>
                                <div class="mb-3">
                                    <label for="country_code" class="form-label">Country Code</label>
                                    <input type="text" name="country_code" class="form-control" id="country_code" placeholder="Enter Your Country Code" value="{{ $settings['country_code']['value']}}" />
                                </div>
                                <div class="mb-3">
                                    <label for="date_format" class="form-label">Date Format</label>
                                    <input type="text" name="date_format" class="form-control" id="date_format" placeholder="Enter Your ate Format" value="{{ $settings['date_format']['value']}}" />
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="mb-3">
                                    <label for="facebook_link" class="form-label">Face Book Link</label>
                                    <input type="text" name="facebook_link" class="form-control" id="facebook_link" placeholder="Enter Your SMTP Password" value="{{ $settings['facebook_link']['value']}}" />
                                </div>
                                <div class="mb-3">
                                    <label for="twitter_link" class="form-label">Twitter Link</label>
                                    <input type="text" name="twitter_link" class="form-control" id="twitter_link" placeholder="Enter Your SMTP Port" value="{{ $settings['twitter_link']['value']}}" />
                                </div>
                                
                                <div class="mb-3">
                                    <label for="instagram_link" class="form-label">Instagram Link</label>
                                    <input type="text" name="instagram_link" class="form-control" id="instagram_link" placeholder="Enter Your Contact Us Receive Email" value="{{ $settings['instagram_link']['value']}}" />
                                </div>
                                <div class="mb-3">
                                    <label for="google_play_store" class="form-label">Google Play Store Link</label>
                                    <input type="text" name="google_play_store" class="form-control" id="google_play_store" placeholder="Enter Your Contact Google Play Store Link" value="{{ $settings['google_play_store']['value']}}" />
                                </div>
                                <div class="mb-3">
                                    <label for="apple_store" class="form-label">Apple Sore Link</label>
                                    <input type="text" name="apple_store" class="form-control" id="apple_store" placeholder="Enter Your Apple Sore Link" value="{{ $settings['apple_store']['value']}}" />
                                </div>
                            </div>
                        </div>
                        </div>
                        
                        <div class="tab-pane" id="location" role="tabpanel">
                            <div class="row">
                                <div class="col-lg-6">
                                    <div class="mb-3">
                                        <label for="google_map_api_id" class="form-label">Google Map API key</label>
                                        <input type="text" name="google_map_api_id" class="form-control" id="google_map_api_id" value="{{ $settings['google_map_api_id']['value'] }}" />
                                    </div>
                                </div>
                            </div>

                        </div>
                    </div>

                    <div class="d-flex flex-wrap gap-2">
                        <button type="submit" class="btn btn-primary waves-effect waves-light">Save Changes</button>
                        <a href="{{ route('settings.index') }}" class="btn btn-secondary waves-effect waves-light">Cancel</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</form>
<!-- end row -->

@endsection
@section('script')
    <!-- select 2 plugin -->
    <script src="{{ URL::asset('/assets/libs/select2/select2.min.js') }}"></script>

    <!-- dropzone plugin -->
    <script src="{{ URL::asset('/assets/libs/dropzone/dropzone.min.js') }}"></script>

    <!-- init js -->
    <script src="{{ URL::asset('/assets/js/pages/ecommerce-select2.init.js') }}"></script>
    <!--tinymce js-->
    <script src="{{ URL::asset('/assets/libs/tinymce/tinymce.min.js') }}"></script>

    <!-- init js -->
    <script src="{{ URL::asset('/assets/js/pages/form-editor.init.js') }}"></script>
    <script src="{{ URL::asset('/assets/libs/parsleyjs/parsleyjs.min.js') }}"></script>

    <script src="{{ URL::asset('/assets/js/pages/form-validation.init.js') }}"></script>
    <script type="text/javascript">
    
@endsection