<?php
// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals -- Variable is confined to this settings partial.

if (! defined('ABSPATH')) exit; // Exit if accessed directly

// Default position value
$current_position = 'center-center';
?>
<div class="ipb-section ipb-position-settings">
 <div class="ipb-section-header">
    <h3>Position Settings</h3>
</div>
<div class="ipb-section-content" data-section="display">
    <div class="ipb-position-row">
        <div class="ipb-position-label">
            <label for="position">Position</label>
        </div>
        <div class="ipb-position-control">
            <div class="ipb-position-grid">
                <div class="ipb-position-cell">
                    <input type="radio" name="position" id="position-start-start" value="start-start" <?php checked($current_position, 'start-start'); ?>>
                    <label for="position-start-start" class="ipb-position-cell-label">
                        <span class="ipb-position-dot"></span>
                    </label>
                </div>
                <div class="ipb-position-cell">
                    <input type="radio" name="position" id="position-start-center" value="start-center" <?php checked($current_position, 'start-center'); ?>>
                    <label for="position-start-center" class="ipb-position-cell-label">
                        <span class="ipb-position-dot"></span>
                    </label>
                </div>
                <div class="ipb-position-cell">
                    <input type="radio" name="position" id="position-start-end" value="start-end" <?php checked($current_position, 'start-end'); ?>>
                    <label for="position-start-end" class="ipb-position-cell-label">
                        <span class="ipb-position-dot"></span>
                    </label>
                </div>
                <div class="ipb-position-cell">
                    <input type="radio" name="position" id="position-center-start" value="center-start" <?php checked($current_position, 'center-start'); ?>>
                    <label for="position-center-start" class="ipb-position-cell-label">
                        <span class="ipb-position-dot"></span>
                    </label>
                </div>
                <div class="ipb-position-cell">
                    <input type="radio" name="position" id="position-center-center" value="center-center" <?php checked($current_position, 'center-center'); ?>>
                    <label for="position-center-center" class="ipb-position-cell-label">
                        <span class="ipb-position-dot"></span>
                    </label>
                </div>
                <div class="ipb-position-cell">
                    <input type="radio" name="position" id="position-center-end" value="center-end" <?php checked($current_position, 'center-end'); ?>>
                    <label for="position-center-end" class="ipb-position-cell-label">
                        <span class="ipb-position-dot"></span>
                    </label>
                </div>
                <div class="ipb-position-cell">
                    <input type="radio" name="position" id="position-end-start" value="end-start" <?php checked($current_position, 'end-start'); ?>>
                    <label for="position-end-start" class="ipb-position-cell-label">
                        <span class="ipb-position-dot"></span>
                    </label>
                </div>
                <div class="ipb-position-cell">
                    <input type="radio" name="position" id="position-end-center" value="end-center" <?php checked($current_position, 'end-center'); ?>>
                    <label for="position-end-center" class="ipb-position-cell-label">
                        <span class="ipb-position-dot"></span>
                    </label>
                </div>
                <div class="ipb-position-cell">
                    <input type="radio" name="position" id="position-end-end" value="end-end" <?php checked($current_position, 'end-end'); ?>>
                    <label for="position-end-end" class="ipb-position-cell-label">
                        <span class="ipb-position-dot"></span>
                    </label>
                </div>
            </div>
            <p class="ipb-position-helper">Choose where the popup appears on the screen.</p>
        </div>
    </div>
</div>
</div>
