@extends('layouts.admin')
@section('content')
<div class="page-header"><div class="page-block"><div class="row align-items-center">
    <div class="col-md-12"><ul class="breadcrumb"><li class="breadcrumb-item"><a href="{{ route('admin.dashboard') }}">হোম</a></li><li class="breadcrumb-item"><a href="javascript: void(0)">সেটিংস</a></li><li class="breadcrumb-item" aria-current="page">Facebook</li></ul></div>
    <div class="col-md-12"><div class="page-header-title"><h2 class="mb-0">{{ __('Facebook Settings') }}</h2></div></div>
</div></div></div>

@include('includes.admin.form-error')
@include('includes.admin.form-success')

<form action="{{ route('social.settings.update') }}" id="geniusform" method="POST" enctype="multipart/form-data">
    {{ csrf_field() }}
    <div class="card">
        <div class="card-header"><h5>{{ __('Facebook Login') }}</h5></div>
        <div class="card-body">
            <div class="row">
                <div class="col-md-6 mb-3">
                    <label class="form-label">{{ __('App ID') }} <span class="text-danger">*</span></label>
                    <p class="text-muted small mb-1">{{ __('Get Your App ID from developers.facebook.com') }}</p>
                    <input type="text" class="form-control" placeholder="{{ __('Enter App ID') }}" name="fclient_id" value="{{ $data->fclient_id }}" required>
                </div>
                <div class="col-md-6 mb-3">
                    <label class="form-label">{{ __('App Secret') }} <span class="text-danger">*</span></label>
                    <p class="text-muted small mb-1">{{ __('Get Your App Secret from developers.facebook.com') }}</p>
                    <input type="text" class="form-control" placeholder="{{ __('Enter App Secret') }}" name="fclient_secret" value="{{ $data->fclient_secret }}" required>
                </div>
                <div class="col-md-6 mb-3">
                    <label class="form-label">{{ __('Website URL') }} <span class="text-danger">*</span></label>
                    <input type="text" class="form-control" value="{{ url('/') }}" readonly>
                </div>
                <div class="col-md-6 mb-3">
                    <label class="form-label">{{ __('Valid OAuth Redirect URI') }} <span class="text-danger">*</span></label>
                    <p class="text-muted small mb-1">{{ __('Copy this url and paste it to your Valid OAuth Redirect URI in developers.facebook.com.') }}</p>
                    @php $url = preg_replace("/^http:/i", "https:", url('/auth/facebook/callback')); @endphp
                    <input type="text" class="form-control" name="fredirect" value="{{$url}}" readonly>
                </div>
            </div>
        </div>
    </div>
    <div class="card"><div class="card-body">
        <button class="btn btn-primary" type="submit"><i class="ti ti-device-floppy me-1"></i>{{ __('Save') }}</button>
    </div></div>
</form>
@endsection