<?php
/**
 * Add New FAQ admin page template
 */

// Prevent direct access
if (!defined('ABSPATH')) {
    exit;
}
?>

<div class="wrap pc-faq-manager-admin">
    <h1 class="wp-heading-inline">
        <?php esc_html_e('Add New FAQ', PC_FAQ_MANAGER_SLUG); ?>
    </h1>
    
    <a href="<?php echo admin_url('admin.php?page=pc-faq-manager'); ?>" class="page-title-action">
        <?php esc_html_e('View All FAQs', PC_FAQ_MANAGER_SLUG); ?>
    </a>
    
    <hr class="wp-header-end">
    
    <div class="pc-faq-manager-add-form">
        <div class="pc-faq-form-container">
            <h2><?php esc_html_e('Create New FAQ', PC_FAQ_MANAGER_SLUG); ?></h2>
            
            <form id="pc-faq-add-form">
                <div class="form-field">
                    <label for="pc-faq-title"><?php esc_html_e('Question', PC_FAQ_MANAGER_SLUG); ?></label>
                    <input type="text" id="pc-faq-title" class="widefat" placeholder="<?php esc_attr_e('Enter your question here...', PC_FAQ_MANAGER_SLUG); ?>" required>
                    <p class="description"><?php esc_html_e('This will be displayed as the question on your FAQ page.', PC_FAQ_MANAGER_SLUG); ?></p>
                </div>
                
                <div class="form-field">
                    <label for="pc-faq-content"><?php esc_html_e('Answer', PC_FAQ_MANAGER_SLUG); ?></label>
                    <textarea id="pc-faq-content" name="content" class="widefat" rows="10" placeholder="<?php esc_attr_e('Enter your answer here...', PC_FAQ_MANAGER_SLUG); ?>" required></textarea>
                    <p class="description"><?php esc_html_e('Provide a detailed answer to the question above.', PC_FAQ_MANAGER_SLUG); ?></p>
                </div>
                
                <div class="form-field">
                    <button type="submit" class="button button-primary button-large">
                        <span class="dashicons dashicons-plus-alt"></span>
                        <?php esc_html_e('Create FAQ', PC_FAQ_MANAGER_SLUG); ?>
                    </button>
                    <a href="<?php echo admin_url('admin.php?page=pc-faq-manager'); ?>" class="button button-large">
                        <?php esc_html_e('Cancel', PC_FAQ_MANAGER_SLUG); ?>
                    </a>
                </div>
            </form>
        </div>
        
        <div class="pc-faq-manager-help">
            <div class="help-card">
                <h3><?php esc_html_e('Pro Tips', PC_FAQ_MANAGER_SLUG); ?></h3>
                <ul>
                    <li><?php esc_html_e('Keep questions clear and concise', PC_FAQ_MANAGER_SLUG); ?></li>
                    <li><?php esc_html_e('Provide comprehensive answers', PC_FAQ_MANAGER_SLUG); ?></li>
                    <li><?php esc_html_e('Use formatting to improve readability', PC_FAQ_MANAGER_SLUG); ?></li>
                    <li><?php esc_html_e('Consider adding images or links if helpful', PC_FAQ_MANAGER_SLUG); ?></li>
                </ul>
            </div>
            
            <div class="help-card">
                <h3><?php esc_html_e('FAQ Page', PC_FAQ_MANAGER_SLUG); ?></h3>
                <p><?php esc_html_e('Your FAQs will automatically appear on the FAQ page. You can find it at:', PC_FAQ_MANAGER_SLUG); ?></p>
                <p><code><?php echo home_url('/faq/'); ?></code></p>
                <p><a href="<?php echo home_url('/faq/'); ?>" target="_blank" class="button"><?php esc_html_e('View FAQ Page', PC_FAQ_MANAGER_SLUG); ?></a></p>
            </div>
        </div>
    </div>
    
    <!-- Success/Error Messages -->
    <div id="pc-faq-add-message" class="notice is-dismissible" style="display: none;"></div>
</div>