<?php
defined('ABSPATH') || exit;
?>
<div id="help-dialog" title="<?php esc_html_e('Help & Quick Links', 'termin-kalender'); ?>"
    style="display:none; line-height: 1.5;">
    <p>
        <strong><?php esc_html_e('Add & Edit:', 'termin-kalender'); ?></strong><br>
        <?php esc_html_e('Click on a free area in the calendar to add a new appointment, or click an existing entry to edit it.', 'termin-kalender'); ?>
    </p>

    <p>
        <strong><?php esc_html_e('Categories:', 'termin-kalender'); ?></strong><br>
        <?php esc_html_e('Click a category button above the calendar to quick-edit its color and icon, or open the full Setup.', 'termin-kalender'); ?>
        <br>
        <a href="<?php echo esc_url(admin_url('admin.php?page=termin_kalender_setup&tab=categories')); ?>"
            style="margin-top: 5px;" class="button">
            <span class="dashicons dashicons-portfolio"></span> <?php echo esc_html__('Setup Categories', 'termin-kalender'); ?>
        </a>
    </p>

    <p>
        <strong><?php esc_html_e('Customize & Publish:', 'termin-kalender'); ?></strong><br>
        <?php esc_html_e('Open the setup pages to define categories and layout before generating your page:', 'termin-kalender'); ?>
        <br>
        <a href="<?php echo esc_url(admin_url('admin.php?page=termin_kalender_calendar_views&tab=calendar')); ?>"
            class="button" style="margin-top: 5px;">
            <span class="dashicons dashicons-calendar-alt"></span> <?php echo esc_html__('Calendar Setup', 'termin-kalender'); ?>
        </a>
        <a href="<?php echo esc_url(admin_url('admin.php?page=termin_kalender_list_views&tab=lists')); ?>"
            class="button" style="margin-top: 5px;">
            <span class="dashicons dashicons-list-view"></span> <?php echo esc_html__('List Setup', 'termin-kalender'); ?>
        </a>
        <br><span class="termin-kalender-admin-text-muted" style="display:inline-block; margin-top:8px;">
            <i>📌 <strong><?php esc_html_e('Calendar Tip:', 'termin-kalender'); ?></strong>
                <?php esc_html_e('Click on your block in the editor to open the Right Sidebar Settings. There you can easily hide specific categories so they don\'t show up on this page!', 'termin-kalender'); ?></i>
        </span>
    </p>

    <p>
        <strong><?php esc_html_e('Sidebar Widgets:', 'termin-kalender'); ?></strong><br>
        <?php esc_html_e('If your active theme has Widget Areas (like a sidebar or footer), placing a nice small calendar or upcoming list right next to your content is a great idea.', 'termin-kalender'); ?>
        <br>
        <span class="termin-kalender-admin-text-muted" style="display:inline-block; margin-top:3px; margin-bottom:8px;">
            <i>📌
                <?php esc_html_e('How to: Open the Widgets page below, expand your desired Sidebar area, click the [+] icon, and search for "Termin-Kalender".', 'termin-kalender'); ?></i>
        </span>
        <br>
        <a href="<?php echo esc_url(admin_url('widgets.php')); ?>" class="button" target="_blank" style="margin-top: 5px;">
            <span class="dashicons dashicons-move"></span> <?php echo esc_html__('Open Widgets', 'termin-kalender'); ?>
        </a>
    </p>

    <div class="termin-kalender-admin-notice-info" style="margin-top: 15px;">
        <strong style="font-size: 1em; cursor: pointer; color:#2271b1;"
            onclick="document.getElementById('tk-shortcode-help').style.display = document.getElementById('tk-shortcode-help').style.display === 'none' ? 'block' : 'none';">
            <?php esc_html_e('Using Elementor, Divi or Classic Editor?', 'termin-kalender'); ?>
            <span class="dashicons dashicons-arrow-down-alt2 termin-kalender-admin-icon-inline"></span>
        </strong>
        <div id="tk-shortcode-help" class="termin-kalender-admin-text-muted" style="display:none; margin-top: 10px; font-family: monospace;">
            <?php esc_html_e('Gutenberg blocks won\'t work in other page builders. Instead, just copy and paste these Shortcodes into your page builder text or shortcode element:', 'termin-kalender'); ?><br><br>
            <strong>[termin-kalender-calendar]</strong><br>
            <strong>[termin-kalender-simple-list]</strong>
        </div>
    </div>

    <?php if (!defined('TERMIN_KALENDER_PRO_ON')): ?>
        <hr style="margin: 20px 0;">

        <div class="termin-kalender-admin-box-light" style="border-left: 4px solid #068bf0;">
            <strong class="termin-kalender-admin-text-lead"
                style="color: #1d2327; margin-bottom: 5px; display: inline-block;"><?php esc_html_e('Need more power for your team?', 'termin-kalender'); ?></strong><br>
            <?php esc_html_e('Unlock To-Do lists, team messaging, forms and recurring events.', 'termin-kalender'); ?>
            <p style="margin-bottom:0; margin-top:10px;">
                <a href="https://checkout.freemius.com/plugin/13582/plan/22720/?trial=free" target="_blank"
                    class="button button-primary button-large"
                    style="background:#068bf0; border-color:#068bf0; text-shadow:none;">
                    <?php echo esc_html__('Start 14-Day FREE PRO Trial', 'termin-kalender'); ?>
                </a>
                <a href="<?php echo esc_url(admin_url('admin.php?page=termin_kalender_setup&tab=pro_info')); ?>"
                    class="button" style="margin-left: 10px;">
                    <span class="dashicons dashicons-info"></span> <?php echo esc_html__('See features', 'termin-kalender'); ?>
                </a>
            </p>
        </div>
    <?php endif; ?>
    
    <div style="text-align: right; margin-top: 20px; padding-top: 15px; border-top: 1px solid #ddd;">
        <button type="button" class="button" onclick="if(typeof jQuery !== 'undefined') jQuery('#help-dialog').dialog('close');">
            <?php esc_html_e('Close', 'termin-kalender'); ?>
        </button>
    </div>
</div>