@extends("admin.layouts.dashboard")
@section("content")
<form 
    method="POST" 
    action="{{ LaravelLocalization::localizeUrl('/admin/settings/tools') }}" 
    enctype="multipart/form-data">
    <div class="row">
        <div class="col-md-4 col-lg-3 mb-4 mb-md-0">
            <div class="card">
                <div class="card-body">
                    <button type="submit" class="btn btn-color-1 w-100">
                        {{ __('lang.save') }}
                    </button>
                </div>
            </div>
        </div>
        <div class="col-md-8 col-lg-9">
            @if ($errors->any())
                <div class="alert alert-1 alert-dismissible fade show" role="alert">
                    @foreach ($errors->all() as $error)
                        <p class="m-0">{{ $error }}</p>
                    @endforeach
                    <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
                </div>
            @endif
            @if (session('success'))
                <div class="alert alert-2 alert-dismissible fade show" role="alert">
                    <p class="m-0">{{ session('success') }}</p>
                    <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
                </div>
            @endif
            @if (session('error'))
                <div class="alert alert-1 alert-dismissible fade show" role="alert">
                    <p class="m-0">{{ session('error') }}</p>
                    <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
                </div>
            @endif
            <div class="card">
                <div class="card-body">
                    <div class="card-heading pb-3 mb-3">{{ __('lang.tools_settings') }}</div>
                    <div class="row">
                        <div class="col-sm-6 col-md-12 col-lg-6 mb-4">
                            <label for="convert" class="form-label">{{ __('lang.convert') }}</label>
                            <select class="form-select" name="convert" id="convert" aria-label="Convert">
                                <option value="1"{{ toolsSetting('convert') == 1 ? ' selected' : '' }}>{{ __('lang.enable') }}</option>
                                <option value="0"{{ toolsSetting('convert') == 0 ? ' selected' : '' }}>{{ __('lang.disable') }}</option>
                            </select>
                        </div>
                        <div class="col-sm-6 col-md-12 col-lg-6 mb-4">
                            <label for="compress" class="form-label">{{ __('lang.compress') }}</label>
                            <select class="form-select" name="compress" id="compress" aria-label="Compress">
                                <option value="1"{{ toolsSetting('compress') == 1 ? ' selected' : '' }}>{{ __('lang.enable') }}</option>
                                <option value="0"{{ toolsSetting('compress') == 0 ? ' selected' : '' }}>{{ __('lang.disable') }}</option>
                            </select>
                        </div>
                        <div class="col-sm-6 col-md-12 col-lg-6 mb-4">
                            <label for="resize" class="form-label">{{ __('lang.resize') }}</label>
                            <select class="form-select" name="resize" id="resize" aria-label="Resize">
                                <option value="1"{{ toolsSetting('resize') == 1 ? ' selected' : '' }}>{{ __('lang.enable') }}</option>
                                <option value="0"{{ toolsSetting('resize') == 0 ? ' selected' : '' }}>{{ __('lang.disable') }}</option>
                            </select>
                        </div>
                        <div class="col-sm-6 col-md-12 col-lg-6 mb-4">
                            <label for="rotate-reflect" class="form-label">{{ __('lang.rotate_reflect') }}</label>
                            <select class="form-select" name="rotate-reflect" id="rotate-reflect" aria-label="Rotate and Reflect">
                                <option value="1"{{ toolsSetting('rotate_reflect') == 1 ? ' selected' : '' }}>{{ __('lang.enable') }}</option>
                                <option value="0"{{ toolsSetting('rotate_reflect') == 0 ? ' selected' : '' }}>{{ __('lang.disable') }}</option>
                            </select>
                        </div>
                        <div class="col-sm-6 col-md-12 col-lg-6 mb-4">
                            <label for="watermark" class="form-label">{{ __('lang.watermark') }}</label>
                            <select class="form-select" name="watermark" id="watermark" aria-label="Watermark">
                                <option value="1"{{ toolsSetting('watermark') == 1 ? ' selected' : '' }}>{{ __('lang.enable') }}</option>
                                <option value="0"{{ toolsSetting('watermark') == 0 ? ' selected' : '' }}>{{ __('lang.disable') }}</option>
                            </select>
                        </div>
                        <div class="col-sm-6 col-md-12 col-lg-6 mb-4">
                            <label for="preferences" class="form-label">{{ __('lang.preferences') }}</label>
                            <select class="form-select" name="preferences" id="preferences" aria-label="Preferences">
                                <option value="1"{{ toolsSetting('preferences') == 1 ? ' selected' : '' }}>{{ __('lang.enable') }}</option>
                                <option value="0"{{ toolsSetting('preferences') == 0 ? ' selected' : '' }}>{{ __('lang.disable') }}</option>
                            </select>
                        </div>
                        <div class="col-sm-6 col-md-12 col-lg-6 mb-4">
                            <label for="effects" class="form-label">{{ __('lang.effects') }}</label>
                            <select class="form-select" name="effects" id="effects" aria-label="Effects">
                                <option value="1"{{ toolsSetting('effects') == 1 ? ' selected' : '' }}>{{ __('lang.enable') }}</option>
                                <option value="0"{{ toolsSetting('effects') == 0 ? ' selected' : '' }}>{{ __('lang.disable') }}</option>
                            </select>
                        </div>
                        <div class="col-sm-6 col-md-12 col-lg-6 mb-4">
                            <label for="autoremove" class="form-label">{{ __('lang.autoremove') }}</label>
                            <select class="form-select" name="autoremove" id="autoremove" aria-label="Autoremove">
                                <option value="1"{{ toolsSetting('autoremove') == 1 ? ' selected' : '' }}>{{ __('lang.enable') }}</option>
                                <option value="0"{{ toolsSetting('autoremove') == 0 ? ' selected' : '' }}>{{ __('lang.disable') }}</option>
                            </select>
                        </div>
                        <div class="col-sm-6 col-md-12 col-lg-6 mb-4 mb-sm-0 mb-lg-0 mb-md-4">
                            <label for="password" class="form-label">{{ __('lang.password') }}</label>
                            <select class="form-select" name="password" id="password" aria-label="Password">
                                <option value="1"{{ toolsSetting('password') == 1 ? ' selected' : '' }}>{{ __('lang.enable') }}</option>
                                <option value="0"{{ toolsSetting('password') == 0 ? ' selected' : '' }}>{{ __('lang.disable') }}</option>
                            </select>
                        </div>
                        <div class="col-sm-6 col-md-12 col-lg-6">
                            <label for="exif-cleaner" class="form-label">{{ __('lang.exif_cleaner') }}</label>
                            <select class="form-select" name="exif-cleaner" id="exif-cleaner" aria-label="Exif Cleaner">
                                <option value="1"{{ toolsSetting('exif_cleaner') == 1 ? ' selected' : '' }}>{{ __('lang.enable') }}</option>
                                <option value="0"{{ toolsSetting('exif_cleaner') == 0 ? ' selected' : '' }}>{{ __('lang.disable') }}</option>
                            </select>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    @csrf
</form>
@stop