@extends('app.admin.layout.layout')
@section('title',__('Edit settings'))
@section('content')
    <style>
        .form-control{
            border-radius: 10px;
            box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;        }
        .form-label{
            font-family: "Helvetica Neue", "Helvetica", "Arial", sans-serif;
        }
        .form-select{
            background-image: none !important;
        }
        .layout-top-spacing{
            margin: 20px;
            border-radius: 15px;
            box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
        }
    </style>
    <br><br><br>
    <div class="card layout-top-spacing">
        <div class="card-body">
            <div class="page-title-container">
                <div class="row">
                    <!-- Title Start -->
                    <div class="col-12 col-md-7">
                        <h1 class="mb-0 pb-0 display-4" id="title">@lang('Edit settings')</h1>
                        <nav class="breadcrumb-container d-inline-block" aria-label="breadcrumb">
                                <ul class="breadcrumb pt-0">
                                    <li class="breadcrumb-item"><a href="{{ route('admin:home') }}">@lang('Dashborad')</a></li>
                                    <li class="breadcrumb-item"><a href="#">@lang('Settings')</a></li>
                                </ul>
                        </nav>
                    </div>

                    <div class="col-12 col-md-5 d-flex align-items-start justify-content-end">
                        <a href="{{ route('admin:home') }}">
                            <button type="button" class="btn btn-outline-primary btn-icon btn-icon-start w-100 w-md-auto">
                                <i data-acorn-icon="arrow-left" class="me-2" data-acorn-size="17"></i>
                                <span>@lang('Back')</span>
                            </button>
                        </a>
                    </div>
                </div>
            </div>
            <form class="row" action="{{route('admin:settings.update',$setting->getAttribute('id'))}}" method="post">
                @csrf
                @method('PUT')
                {{-- <x-admin.form.input
                        :label="__('Site name')"
                        name="app_name"
                        :maxlength="60"
                        custom-div-class="col-12 col-sm-3"
                        :value="old('app_name',$setting->getAttribute('app_name'))"/>

                <x-admin.form.input
                        :label="__('Site description')"
                        name="app_description"
                        :maxlength="160"
                        custom-div-class="col-12 col-sm-3"
                        :value="old('app_name',$setting->getAttribute('app_description'))"/>


                <x-admin.form.select
                    :label="__('Image driver')"
                    name="image_driver"
                    custom-div-class="col-12 col-sm-3"
                    :selected="old('image_driver',$setting->getAttribute('image_driver'))"
                    :options="['gd' => __('Gd'),'imagick' => __('Imagick')]"
                    required/>

                <x-admin.form.select
                    :label="__('Compression percent')"
                    name="compression_percent"
                    custom-div-class="col-12 col-sm-3"
                    :selected="old('compression_percent',$setting->getAttribute('compression_percent'))"
                    :options="$compressionPercents"
                    required/> --}}

                {{--  <x-admin.form.input
                    :label="__('Logo')"
                    name="logo_image"
                    type="file"
                    custom-div-class="col-12 col-lg-6"
                    :value="old('logo_image')"/>

                <x-admin.form.input
                    :label="__('Background Image')"
                    name="back_image"
                    type="file"
                    custom-div-class="col-12 col-lg-6"
                    :value="old('back_image')"/>  --}}


                <x-admin.form.input
                    :label="__('Restaurant Name')"
                    name="name"
                    type="text"
                    custom-div-class="col-12 col-lg-4"
                    :value="old('name',$setting->getAttribute('name'))"/>

                <x-admin.form.input
                    :label="__('Start Date')"
                    name="start_date"
                    type="text"
                    custom-div-class="col-12 col-lg-4"
                    :value="old('start_date',$setting->getAttribute('start_date'))"/>

                <x-admin.form.input
                    :label="__('End Date')"
                    name="end_date"
                    type="text"
                    custom-div-class="col-12 col-lg-4"
                    :value="old('end_date',$setting->getAttribute('end_date'))"/>


                <x-admin.form.input
                        :label="__('Site address')"
                        name="app_address"
                        :maxlength="250"
                        custom-div-class="col-12 col-lg-12"
                        :value="old('app_address',$setting->getAttribute('app_address'))"/>

                <x-admin.form.input
                    :label="__('Site email')"
                    name="app_email"
                    type="email"
                    custom-div-class="col-12 col-lg-6"
                    :value="old('app_email',$setting->getAttribute('app_email'))"/>

                <x-admin.form.input
                    :label="__('Site email 2')"
                    name="app_email1"
                    type="email"
                    custom-div-class="col-12 col-lg-6"
                    :value="old('app_email',$setting->getAttribute('app_email1'))"/>


                <x-admin.form.input
                        :label="__('Site phone')"
                        name="app_phone"
                        custom-div-class="col-12 col-lg-6"
                        :value="old('app_phone',$setting->getAttribute('app_phone'))"/>

                <x-admin.form.input
                    :label="__('Site phone 2')"
                    name="app_phone1"
                    custom-div-class="col-12 col-lg-6"
                    :value="old('app_phone1',$setting->getAttribute('app_phone1'))"/>



                <x-admin.form.input
                        :label="__('Facebook')"
                        name="facebook"
                        custom-div-class="col-12 col-lg-4"
                        :value="old('facebook',$setting->getAttribute('facebook'))"/>

                <x-admin.form.input
                        :label="__('Instagram')"
                        name="instagram"
                        custom-div-class="col-12 col-lg-4"
                        :value="old('instagram',$setting->getAttribute('instagram'))"/>

                <x-admin.form.input
                        :label="__('Telegram')"
                        name="telegram"
                        custom-div-class="col-12 col-lg-4"
                        :value="old('telegram',$setting->getAttribute('telegram'))"/>

                <x-admin.form.input
                        :label="__('Linkedin')"
                        name="linkedin"
                        custom-div-class="col-12 col-lg-4"
                        :value="old('linkedin',$setting->getAttribute('linkedin'))"/>


                <x-admin.form.input
                    :label="__('Tiktok')"
                    name="tiktok"
                    custom-div-class="col-12 col-lg-4"
                    :value="old('tiktok',$setting->getAttribute('tiktok'))"/>

                <x-admin.form.input
                    :label="__('YouTube')"
                    name="youtube"
                    custom-div-class="col-12 col-lg-4"
                    :value="old('youtube',$setting->getAttribute('youtube'))"/>

                <x-admin.form.input
                    :label="__('Be')"
                    name="be"
                    custom-div-class="col-12 col-lg-12"
                    :value="old('be',$setting->getAttribute('be'))"/>




                <x-admin.form.submit-button
                class="btn btn-secondary"
                style="background-color: #475569 !important"
                button-text="Update"/>
            </form>
        </div>
    </div>
@endsection
@push('js')
    <script src="{{asset('/assets/admin/plugins/src/bootstrap-maxlength/bootstrap-maxlength.js')}}"></script>
    <script src="{{asset('/assets/admin/plugins/src/input-mask/jquery.inputmask.bundle.min.js')}}"></script>
    <script>
        $(document).ready(function () {
            $("#app_description,#app_name").maxlength({
                alwaysShow: true,
            });
            $("#app_phone").inputmask({mask: "+999 99 999 99 99"});
        })
    </script>
@endpush
