<?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
<?php if ( !isset($_GET['user_nonce']) || !wp_verify_nonce(sanitize_text_field(wp_unslash($_GET['user_nonce'])), 'Copuloo') ) {} ?>
<div class="copuloo-admin-wrap">
<?php if ($current_page == 'info' && !isset($_GET['tabpage'])) { ?>
  <div class="copuloo-card">
        <h2 class="copuloo-title">Twilio Account Required</h2>
        <p class="copuloo-description">In order to use Copuloo a Twilio account is required as Twilio handles the backend infastructure for managing phone calls and texts over the internet.</p>
        <p class="copuloo-description">To obtain a phone number for Copuloo, start by creating a Twilio account at twilio.com, a straightforward process that involves signing up with an email and funding your account with a small balance to cover call and SMS costs (a trial account often includes initial credits). Once your Twilio account is active, retrieve your Account SID and Auth Token from the Twilio Console and add them inside the Setup page.</p>
        <p class="copuloo-description">To keep your Copuloo plugin running smoothly, maintain a sufficient balance in your Twilio account. Twilio charges on a pay-as-you-go basis for each call and text message, plus a small monthly fee for each active phone number. A sufficient balance ensures uninterrupted service and prevents failed calls or message delivery due to insufficient credit.</p>
    </div>
    <div class="copuloo-card">
        <h2 class="copuloo-title">Getting A Phone Number</h2>
        <p class="copuloo-description">To get a phone number you need to have created a Twilio account and have already added the necessary API keys inside the Setup page.</p>
        <p>You can find documentation at <a href="https://copuloo.com/documentation/?doc=easy_obtain" target="_blank">Obtain a Number</a></p>
        <p class="copuloo-description"><p>
    </div>
    <div class="copuloo-card">
        <h2 class="copuloo-title">Supported Browsers</h2>
        <p class="copuloo-description">Most modern browsers will generally work with Copuloo; however, for the best experience and full functionality, we recommend using one of the officially supported browsers listed below:</p>
        <ul class="copuloo-list">
            <li><strong>Chrome</strong></li>
            <li><strong>Firefox</strong></li>
            <li><strong>Safari (macOS, iOS)</strong>: WebRTC support started with Safari version 11.</li>
            <li><strong>Edge</strong>: Only the Chromium-based version is supported, not the legacy Edge.</li>
        </ul>
        <h3 class="copuloo-subtitle">Mobile Browsers</h3>
        <p class="copuloo-description">While mobile browsers can technically support the Twilio Voice JavaScript SDK for calling, there are limitations related to call interruption handling and background call functionality that may negatively impact user experience. Mobile browsers may struggle with making and receiving calls, but all other features will work fine.</p>
    </div>
    <div class="copuloo-card">
        <h2 class="copuloo-title">User Roles</h2>
        <p class="copuloo-description">The Copuloo plugin includes a dedicated user role that allows users to access the call center dashboard without modifying restricted settings. Administrators have full access to all features.</p>
        <p class="copuloo-description"><strong>Administrators:</strong></p>
        <ul class="copuloo-list">
            <li>Copuloo call center dashboard</li>
            <li>Settings - Admin Page</li>
            <li>Information - Admin Page</li>
            <li>Active Numbers - Admin Page</li>
            <li>Released Numbers - Admin Page</li>
            <li>Add Number - Admin Page</li>
            <li>Remove Number - Admin Page</li>
            <li>License - Admin Page</li>
        </ul>
        <p class="copuloo-description"><strong>Copuloo Role:</strong></p>
        <ul class="copuloo-list">
            <li>Access to the Copuloo call center dashboard only</li>
        </ul>
        <p class="copuloo-description">To assign the Copuloo role to a WordPress user, go to their account in the WordPress admin and change their role to Copuloo.</p>
    </div>
<?php } if ($current_page == 'info' && isset($_GET['tabpage']) && sanitize_text_field(wp_unslash($_GET['tabpage']) == 'additional')) { ?>
<div class="copuloo-card">
    <h2 class="copuloo-title">Phone Number Availability</h2>
    <p class="copuloo-description">Copuloo integrates with Twilio to offer voice and SMS-enabled phone numbers globally. Any phone number supported by Twilio is compatible with Copuloo. However, limitations on phone number types and capabilities may apply due to telecommunications regulations in certain countries or regions, rather than Twilio itself.</p>
    <p class="copuloo-description">You can find regulatory requirements for all Twilio phone numbers <a href="https://www.twilio.com/guidelines/regulatory/" target="_blank" class="copuloo-link">on this page</a>.</p>
</div>
<div class="copuloo-card">
    <h2 class="copuloo-title">Feature Overview and Country-Specific Limitations</h2>
    <div class="copuloo-table-container">
        <table class="copuloo-table">
            <thead>
                <tr>
                    <th>Feature</th>
                    <th>Description</th>
                    <th>Regulation Impact</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>Send Texts (SMS)</td>
                    <td>Send outbound text messages to customers or leads.</td>
                    <td><span class="copuloo-badge copuloo-badge-danger">Limited in Some Countries</span></td>
                </tr>
                <tr>
                    <td>Receive Texts (SMS)</td>
                    <td>Receive inbound text messages from customers.</td>
                    <td><span class="copuloo-badge copuloo-badge-success">None</span></td>
                </tr>
                <tr>
                    <td>Make Phone Calls</td>
                    <td>Place outbound calls to customers, leads, or contacts.</td>
                    <td><span class="copuloo-badge copuloo-badge-danger">Limited in Some Countries</span></td>
                </tr>
                <tr>
                    <td>Receive Phone Calls</td>
                    <td>Receive inbound phone calls from customers.</td>
                    <td><span class="copuloo-badge copuloo-badge-success">None</span></td>
                </tr>
                <tr>
                    <td>Forward Phone Calls</td>
                    <td>Automatically route incoming calls to a chosen number.</td>
                    <td><span class="copuloo-badge copuloo-badge-success">None</span></td>
                </tr>
                <tr>
                    <td>Manage Contacts</td>
                    <td>Organize and manage your customer contact list.</td>
                    <td><span class="copuloo-badge copuloo-badge-success">None</span></td>
                </tr>
                <tr>
                    <td>Setup AI Assistant</td>
                    <td>Create a virtual voice assistant to interact with callers.</td>
                    <td><span class="copuloo-badge copuloo-badge-success">None</span></td>
                </tr>
                <tr>
                    <td>Setup Automated Responses</td>
                    <td>Configure automated responses to incoming calls.</td>
                    <td><span class="copuloo-badge copuloo-badge-success">None</span></td>
                </tr>
                <tr>
                    <td>Setup Timetable</td>
                    <td>Schedule business hours and configure how calls are handled outside of them.</td>
                    <td><span class="copuloo-badge copuloo-badge-success">None</span></td>
                </tr>
            </tbody>
        </table>
    </div>
</div>
<div class="copuloo-card">
    <h2 class="copuloo-title">Availability of Toll-Free, Mobile, and Local Numbers</h2>
    <div class="copuloo-table-container">
        <table class="copuloo-table">
            <thead>
                <tr>
                    <th>Number Type</th>
                    <th>General Availability</th>
                    <th>Country-Specific Limitations</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td><strong>Toll-Free</strong></td>
                    <td>Available in many countries, mainly North America and parts of Europe</td>
                    <td>May not support SMS in some countries; not always available in developing regions</td>
                </tr>
                <tr>
                    <td><strong>Mobile</strong></td>
                    <td>Widely available and supported globally</td>
                    <td>Subject to SMS regulations or filtering in some countries; opt-in required in many</td>
                </tr>
                <tr>
                    <td><strong>Local</strong></td>
                    <td>Available in most countries with regional or city-level targeting</td>
                    <td>Some countries restrict foreign businesses from obtaining local numbers</td>
                </tr>
            </tbody>
        </table>
    </div>
</div>
<?php } ?>
</div>