<?php
/**
 * Partner Selection Component
 *
 * Two modes:
 * 1. Context Mode - When partner is pre-selected from Network page (shows locked partner)
 * 2. Selection Mode - When user navigates directly to Guest Posts (shows dropdown)
 *
 * @package Consolety
 */

if (!defined('ABSPATH')) exit;
?>

<!-- Partner Context (when pre-selected from Network page) -->
<div id="partner-context-wrap" class="vp-partner-context" style="display:none;">
    <div class="vp-partner-context-header">
        <span class="dashicons dashicons-edit"></span>
        <span><?php esc_html_e('You are writing a guest post for:', 'consolety'); ?></span>
    </div>
    <div class="vp-partner-context-card">
        <strong class="vp-partner-context-domain" id="context-partner-domain"></strong>
        <div class="vp-partner-context-stats" id="context-partner-stats"></div>
        <button type="button" class="vp-btn vp-btn-ghost vp-btn-sm" id="btn-change-partner">
            <?php esc_html_e('Change', 'consolety'); ?>
        </button>
    </div>
</div>

<!-- Partner Selection Dropdown (when not pre-selected) -->
<div id="partner-selection-wrap" class="vp-partner-dropdown-wrap" style="display:none;">
    <label class="vp-partner-selection-label">
        <?php esc_html_e('Choose where to publish:', 'consolety'); ?>
    </label>
    <select id="partner-dropdown" class="vp-partner-dropdown">
        <option value=""><?php esc_html_e('-- Select a partner --', 'consolety'); ?></option>
    </select>
    <p class="vp-partner-hint"><?php esc_html_e('Your guest post will be sent to this partner for review.', 'consolety'); ?></p>
</div>

<div class="vp-partner-empty" id="partner-empty" style="display:none;">
    <div class="vp-empty-icon">
        <span class="dashicons dashicons-admin-links" style="font-size: 32px; width: 32px; height: 32px; color: var(--vp-text-muted);"></span>
    </div>
    <h4><?php esc_html_e('No partners yet', 'consolety'); ?></h4>
    <p><?php esc_html_e('Connect with other sites first to start collaborating.', 'consolety'); ?></p>
    <a href="<?php echo esc_url(admin_url('admin.php?page=consolety-network')); ?>" class="vp-btn vp-btn-primary vp-btn-sm">
        <?php esc_html_e('View Network', 'consolety'); ?>
    </a>
</div>

<!-- Requirements Display (shown after partner selection) -->
<div id="partner-requirements-display" class="vp-requirements-display" style="display:none;">
    <div class="vp-requirements-header">
        <span class="dashicons dashicons-clipboard"></span>
        <strong><?php esc_html_e('Publication requirements for this partner:', 'consolety'); ?></strong>
    </div>
    <div class="vp-requirements-list">
        <div class="vp-req-item" id="req-words-item">
            <span class="dashicons dashicons-editor-paste-word"></span>
            <span><?php esc_html_e('Minimum', 'consolety'); ?> <strong id="req-min-words-display">500</strong> <?php esc_html_e('words', 'consolety'); ?></span>
        </div>
        <div class="vp-req-item" id="req-ai-item">
            <span class="dashicons dashicons-admin-users"></span>
            <span id="req-ai-policy-display"><?php esc_html_e('AI content allowed', 'consolety'); ?></span>
        </div>
        <div class="vp-req-item" id="req-links-item">
            <span class="dashicons dashicons-admin-links"></span>
            <span><?php esc_html_e('Maximum', 'consolety'); ?> <strong id="req-max-links-display">3</strong> <?php esc_html_e('dofollow links', 'consolety'); ?></span>
        </div>
        <div class="vp-req-item vp-req-warning" id="req-forbidden-item" style="display:none;">
            <span class="dashicons dashicons-warning"></span>
            <span><?php esc_html_e('Not accepted:', 'consolety'); ?> <span id="req-forbidden-list"></span></span>
        </div>
        <div class="vp-req-item vp-req-note" id="req-note-item" style="display:none;">
            <span class="dashicons dashicons-format-quote"></span>
            <span id="req-custom-note-display"></span>
        </div>
    </div>
</div>


<!-- JavaScript is loaded via wp_enqueue_script in class-admin.php -->
