@include('layouts.header')

    <!-- BEGIN: Content-->
    <div class="app-content content ">
        <div class="content-overlay"></div>
        <div class="header-navbar-shadow"></div>
        <div class="content-wrapper">
            <div class="content-header row">
                <h4>{{ __('Rest API') }}</h4>
            </div>
            <div class="content-body">
                <section class="app-restapi">
                    <div class="card">
                        <div class="card-body border-bottom">
                            <h3>PHP API CODE {{ __('Send Text/Media Message') }} (GET)</h3>
                            <textarea id="sendget" name="sendget">{{$sendget}}</textarea><br><br>
                            <h3>PHP API CODE {{ __('Send Text/Media Message') }} (POST)</h3>
                            <textarea id="sendpost" name="sendpost">{{$sendpost}}</textarea><br><br>
                            <h3>PHP API CODE {{ __('Get QR code/image/base64') }} (GET)</h3>
                            <textarea id="getqrget" name="getqrget">{{$getqrget}}</textarea><br><br>
                            <h3>PHP API CODE {{ __('Check if a number is on whatsapp') }} (GET)</h3>
                            <textarea id="onwaget" name="onwaget">{{$onwaget}}</textarea><br><br>
                            <h3>PHP API CODE {{ __('Check if a number is on whatsapp') }} (POST)</h3>
                            <textarea id="onwapost" name="onwapost">{{$onwapost}}</textarea><br><br>
                            <h3>PHP API CODE {{ __('Fetch groups') }} (GET)</h3>
                            <textarea id="fetchgroupsget" name="fetchgroupsget">{{$fetchgroupsget}}</textarea><br><br>
                            <h3>PHP API CODE {{ __('Fetch groups') }} (POST)</h3>
                            <textarea id="fetchgroupspost" name="fetchgroupspost">{{$fetchgroupspost}}</textarea><br><br>
                            <h3>PHP API CODE {{ __('Send LOCATION') }} (GET)</h3>
                            <textarea id="locationget" name="locationget">{{$locationget}}</textarea><br><br>
                            <h3>PHP API CODE {{ __('Send LOCATION') }} (POST)</h3>
                            <textarea id="locationpost" name="locationpost">{{$locationpost}}</textarea><br><br>
                            <h3>PHP API CODE {{ __('Send POLL') }} (POST)</h3>
                            <textarea id="pollpost" name="pollpost">{{$pollpost}}</textarea><br><br>
                            <h3>PHP API CODE {{ __('Send VCARD') }} (GET)</h3>
                            <textarea id="vcardget" name="vcardget">{{$vcardget}}</textarea><br><br>
                            <h3>PHP API CODE {{ __('Send VCARD') }} (POST)</h3>
                            <textarea id="vcardpost" name="vcardpost">{{$vcardpost}}</textarea><br><br>
                            @if (Auth::user()->role === 'admin')
                            <h3>{{ __('Cron job settings') }}</h3>
                            <textarea id="cronjob" name="cronjob">{{$cronjob}}</textarea><br><br>
                            @endif
                        </div>
                    </div>
                </section>
            </div>
        </div>
    </div>

    <!-- END: Content-->

    <!-- BEGIN: Vendor JS-->
    <script src="{{ url('/') }}/app-assets/vendors/js/vendors.min.js"></script>
    <script src="app-assets/vendors/js/codemirror/lib/codemirror.js"></script>
    <script src="app-assets/vendors/js/codemirror/mode/clike/clike.js"></script>
    <script src="app-assets/vendors/js/codemirror/mode/css/css.js"></script>
    <script src="app-assets/vendors/js/codemirror/mode/htmlmixed/htmlmixed.js"></script>
    <script src="app-assets/vendors/js/codemirror/mode/javascript/javascript.js"></script>
    <script src="app-assets/vendors/js/codemirror/mode/php/php.js"></script>
    <script src="app-assets/vendors/js/codemirror/mode/xml/xml.js"></script>
    <link rel="stylesheet" href="app-assets/vendors/js/codemirror/lib/codemirror.css">
    <link rel="stylesheet" href="app-assets/vendors/js/codemirror/theme/dracula.css">
    <!-- BEGIN Vendor JS-->

    <script>
        var sendget = CodeMirror.fromTextArea(document.getElementById('sendget'), {
            mode: "php",
            theme: "dracula",
            lineNumbers: true,
            autoCloseTags: true,
        });
        sendget.setSize(null, "180");

        var sendpost = CodeMirror.fromTextArea(document.getElementById('sendpost'), {
            mode: "php",
            theme: "dracula",
            lineNumbers: true,
            autoCloseTags: true,
        });
        sendpost.setSize(null, "550");

        var getqrget = CodeMirror.fromTextArea(document.getElementById('getqrget'), {
            mode: "php",
            theme: "dracula",
            lineNumbers: true,
            autoCloseTags: true,
        });
        getqrget.setSize(null, "180");

        var onwaget = CodeMirror.fromTextArea(document.getElementById('onwaget'), {
            mode: "php",
            theme: "dracula",
            lineNumbers: true,
            autoCloseTags: true,
        });
        onwaget.setSize(null, "140");

        var onwapost = CodeMirror.fromTextArea(document.getElementById('onwapost'), {
            mode: "php",
            theme: "dracula",
            lineNumbers: true,
            autoCloseTags: true,
        });
        onwapost.setSize(null, "420");

        var fetchgroupsget = CodeMirror.fromTextArea(document.getElementById('fetchgroupsget'), {
            mode: "php",
            theme: "dracula",
            lineNumbers: true,
            autoCloseTags: true,
        });
        fetchgroupsget.setSize(null, "140");

        var fetchgroupspost = CodeMirror.fromTextArea(document.getElementById('fetchgroupspost'), {
            mode: "php",
            theme: "dracula",
            lineNumbers: true,
            autoCloseTags: true,
        });
        fetchgroupspost.setSize(null, "420");

        var locationget = CodeMirror.fromTextArea(document.getElementById('locationget'), {
            mode: "php",
            theme: "dracula",
            lineNumbers: true,
            autoCloseTags: true,
        });
        locationget.setSize(null, "140");

        var locationpost = CodeMirror.fromTextArea(document.getElementById('locationpost'), {
            mode: "php",
            theme: "dracula",
            lineNumbers: true,
            autoCloseTags: true,
        });
        locationpost.setSize(null, "460");

        var pollpost = CodeMirror.fromTextArea(document.getElementById('pollpost'), {
            mode: "php",
            theme: "dracula",
            lineNumbers: true,
            autoCloseTags: true,
        });
        pollpost.setSize(null, "540");

        var vcardget = CodeMirror.fromTextArea(document.getElementById('vcardget'), {
            mode: "php",
            theme: "dracula",
            lineNumbers: true,
            autoCloseTags: true,
        });
        vcardget.setSize(null, "140");

        var vcardpost = CodeMirror.fromTextArea(document.getElementById('vcardpost'), {
            mode: "php",
            theme: "dracula",
            lineNumbers: true,
            autoCloseTags: true,
        });
        vcardpost.setSize(null, "460");

        var cronjob = CodeMirror.fromTextArea(document.getElementById('cronjob'), {
            mode: "php",
            theme: "dracula",
            lineNumbers: true,
            autoCloseTags: true,
        });
        cronjob.setSize(null, "140");
    </script>

@include('layouts.footer')
