<?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('Once your categories are set, you\'re ready — work directly in the admin calendar.', 'termin-kalender'); ?>
        <br>
                <?php esc_html_e('Or generate a front-end calendar view for 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>

    </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>
    
    <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>