@extends('admin.layout.master')
@section('content')
<!-- THE ROW END HERE -->
<div class='bg-white p-2 rounded m-2'>
    <div class="rowjustify-content-between p-2 rounded m-2  bg-light">
        <div class="col-12 col-md-6 align-self-center p-2">
            <a class='text-decoration-none fw-bold theme_link_color' href="{{url('/home')}}">{{trans('admin.Home')}}  </a> <span class="bi bi-caret-right-fill theme_text_color"></span>
            <a class='text-decoration-none fw-bold theme_link_color' href="{{url('/theme_appearance')}}">{{trans('admin.themes appearance')}}  </a> <span class="bi bi-caret-right theme_text_color"></span>
            <span class='text-decoration-none fw-bold theme_text_color' >{{trans('admin.theme settings')}}</span>
        </div>
    </div>
    <div class='p-3'>
        <form action="{{route('edit_theme_setting')}}" method="post" enctype="multipart/form-data">
            <input type="hidden" name="_token" value="{{ csrf_token() }}" />
            <div class="row">
                <div class="col-md-9">
                    <div class="row">
                        <div class="col-md-6">
                            <div class="mb-3 font-text">
                                <label for="slider_title_en" class="form-label">{{ trans('admin.title') }}</label>
                                <input type="text" class="form-control rounded-pill bg-light_c border-0 @error('slider_title_en') is-invalid @enderror" id="slider_title_en" name="slider_title_en" placeholder="{{ trans('admin.title') }}" aria-describedby="emailHelp">
                                @error('slider_title_en')
                                    <span class="text-danger">{{ $message }}</span>
                                @enderror
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="mb-3 font-text">
                                <label for="slider_title_ar" class="form-label">{{ trans('admin.title_ar') }}</label>
                                <input type="text" class="form-control rounded-pill bg-light_c border-0 @error('slider_title_ar') is-invalid @enderror" id="slider_title_ar" name="slider_title_ar" placeholder="{{ trans('admin.title_ar') }}" aria-describedby="emailHelp">
                                @error('slider_title_ar')
                                    <span class="text-danger">{{ $message }}</span>
                                @enderror
                            </div>
                        </div>
                        <div class="col-md-12">
                            <div class="mb-3 font-text">
                                <label for="slider_desc_en" class="form-label">{{ trans('admin.description') }}</label>
                                <textarea type="text" rows="5" class="form-control bg-light_c border-0 @error('slider_desc_en') is-invalid @enderror" id="slider_desc_en" name="slider_desc_en" placeholder="{{ trans('admin.description') }}" aria-describedby="emailHelp"></textarea>
                                @error('slider_desc_en')
                                    <span class="text-danger">{{ $message }}</span>
                                @enderror
                            </div>
                        </div>
                        <div class="col-md-12">
                            <div class="mb-3 font-text">
                                <label for="slider_desc_ar" class="form-label">{{ trans('admin.description_ar') }}</label>
                                <textarea type="text" rows="5" class="form-control bg-light_c border-0 @error('slider_desc_ar') is-invalid @enderror" id="slider_desc_ar" name="slider_desc_ar" placeholder="{{ trans('admin.description') }}" aria-describedby="emailHelp"></textarea>
                                @error('slider_desc_ar')
                                    <span class="text-danger">{{ $message }}</span>
                                @enderror
                            </div>
                        </div>
                        <div class="col-md-4">
                            <!-- switch start  -->
                            <div class="d-flex justify-content-between py-3 ">
                                <label for="status" class="ms-2 mb-1">{{ trans('admin.status') }}</label>
                                <label class="switch">
                                    <input type="checkbox" name="status" id="status" value="1">
                                    <div class="slider round">
                                        <!--ADDED HTML -->
                                        <span class="on">{{ trans('admin.on') }}</span>
                                        <span class="off">{{ trans('admin.off') }}</span>
                                    </div>
                                </label>
                            </div>
                            <!-- switch end  -->
                        </div>
                    </div>
                </div>
                <div class="col-md-3">
                    <div class="container mt-lg-2 pt-3 ">
                        <label class="upload-btn-wrapper bg-light_c" for="file">
                            <img src="{{ asset('images/profile/') }}" class="img-fluid" alt="" id="preview">
                            <span class=" p-1 text-start"><i class="bi bi-camera pe-1"></i>Click Here</span>
                            @error('photo')
                            <br><span class="text-danger">{{ $message }}</span>
                            @enderror
                        </label>
                        <input type="file" name="photo" id="file" class="d-none  bg-light_c" onchange="itemname(event)" />
                    </div>
                </div>
            </div>
            <button type='sumbit' class='btn  btn-color rounded-pill text-light px-5 mt-3 '>{{ trans('admin.add') }}</button>
        </form>
    </div>
</div>
</div>
<script>
    function itemname(event) {
        var preview = document.getElementById("preview");
        preview.src = URL.createObjectURL(event.target.files[0]);
    }
</script>
@endsection
