@extends('admin.layouts.master')
@section('title', __('one_signal_settings'))

@section('content')
    <div class="container-fluid">
        <div class="row justify-content-center">
           
            <div class="col-lg-6">
                <h3 class="section-title">{{ __('one_signal_settings') }}</h3>
                <div class="bg-white redious-border p-20 p-sm-30 pt-sm-30">
                    <form action="{{ route('admin.setting.update') }}" method="post" enctype="multipart/form-data">
                        @csrf
                        <div class="mb-2">
                            <label for="one_signal_key" class="form-label"> {{ __('one_signal_key') }} <span class="text-danger">*</span> </label>
                            <input type="text" class="form-control rounded-2" id="one_signal_key" name="one_signal_key"
                                value="{{ isDemoMode() ? '' : get_config('one_signal_key') }}"
                                placeholder="{{ __('one_signal_key') }}">
                            <div class="nk-block-des text-danger">
                                <p class="error">{{ $errors->first('one_signal_key') }}</p>
                            </div>
                        </div>
                        <div class="mb-2">
                            <label for="one_signal_id" class="form-label"> {{ __('one_signal_id') }} <span class="text-danger">*</span> </label>
                            <input type="text" class="form-control rounded-2" id="google_api_key" name="one_signal_id"
                                value="{{ isDemoMode() ? '' : get_config('one_signal_id') }}"
                                placeholder="{{ __('one_signal_id') }}">
                            <div class="nk-block-des text-danger">
                                <p class="error">{{ $errors->first('one_signal_id') }}</p>
                            </div>
                        </div>
                        <div class="d-flex gap-12 sandbox_mode_div my-4">
                            <input type="hidden" name="one_signal_status"
                                value="{{ get_config('one_signal_status') == 1 ? 1 : 0 }}">
                            <label class="form-label"
                                for="one_signal_status">{{ __('one_signal_status') }}</label>
                            <div class="setting-check">
                                <input type="checkbox" value="1" id="one_signal_status" class="sandbox_mode" {{ get_config('one_signal_status') == 1 ? 'checked' : '' }}>
                                <label for="one_signal_status"></label>
                            </div>
                        </div>
                        <div class="d-flex justify-content-start align-items-center">
                            <button type="submit" class="btn sg-btn-primary">{{ __('submit') }}</button>
                            @include('layouts.loading_button', ['class' => 'btn sg-btn-primary'])
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
@endsection
