<?php
/**
 * News panels view (admin).
 *
 * @package Noesia_Smart_Waiter
 */

if ( ! defined( 'ABSPATH' ) ) {
    exit;
}
?>
<div class="noesia-swa-news-wrap" data-noesia-swa-news-root="1" data-noesia-swa-news-view="panels">
    <div class="noesia-swa-news-toolbar" role="toolbar" aria-label="<?php echo esc_attr__( 'News layout modes', 'noesia-smart-waiter' ); ?>">
        <div class="noesia-swa-news-view-switch" data-noesia-swa-news-view-switch="1">
            <button type="button" class="noesia-swa-news-view-btn is-active" data-noesia-swa-news-view-btn="panels"><?php esc_html_e( 'Panels', 'noesia-smart-waiter' ); ?></button>
            <button type="button" class="noesia-swa-news-view-btn" data-noesia-swa-news-view-btn="list"><?php esc_html_e( 'List', 'noesia-smart-waiter' ); ?></button>
            <button type="button" class="noesia-swa-news-view-btn" data-noesia-swa-news-view-btn="pulse"><?php esc_html_e( 'Pulse', 'noesia-smart-waiter' ); ?></button>
            <button type="button" class="noesia-swa-news-view-btn" data-noesia-swa-news-view-btn="exclusive"><?php esc_html_e( 'Exclusive', 'noesia-smart-waiter' ); ?></button>
        </div>
        <p class="noesia-swa-news-toolbar-note"><?php esc_html_e( 'Switch between panels, list, pulse and exclusive editorial layout. Your choice stays saved in this browser.', 'noesia-smart-waiter' ); ?></p>
    </div>

    <div class="noesia-swa-news-grid">

        <div class="noesia-swa-card noesia-swa-news-card" data-noesia-swa-news-card="general">
            <div class="noesia-swa-card-header">
                <div>
                    <h3><?php esc_html_e( '📰 General News', 'noesia-smart-waiter' ); ?></h3>
                    <p class="noesia-swa-muted">
                        <?php esc_html_e( 'Top headlines', 'noesia-smart-waiter' ); ?>
                        · <?php esc_html_e( 'Country:', 'noesia-smart-waiter' ); ?>
                        <span id="noesia-swa-general-news-country">—</span>
                    </p>
                </div>
                <button type="button" class="button button-small noesia-swa-news-refresh" data-noesia-swa-news-refresh="general">↻</button>
            </div>
            <div class="noesia-swa-card-body">
                <ul id="noesia-swa-general-news" class="noesia-swa-news-list" data-noesia-swa-news-panel="general" aria-live="polite">
                    <li class="noesia-swa-news-item noesia-swa-news-item--placeholder"><?php esc_html_e( 'Loading headlines…', 'noesia-smart-waiter' ); ?></li>
                </ul>
            </div>
        </div>

        <div class="noesia-swa-card noesia-swa-news-card" data-noesia-swa-news-card="business">
            <div class="noesia-swa-card-header">
                <div>
                    <h3><?php esc_html_e( '💼 Business News', 'noesia-smart-waiter' ); ?></h3>
                    <p class="noesia-swa-muted">
                        <?php esc_html_e( 'Top headlines', 'noesia-smart-waiter' ); ?>
                        · <?php esc_html_e( 'Country:', 'noesia-smart-waiter' ); ?>
                        <span id="noesia-swa-business-news-country">—</span>
                    </p>
                </div>
                <button type="button" class="button button-small noesia-swa-news-refresh" data-noesia-swa-news-refresh="business">↻</button>
            </div>
            <div class="noesia-swa-card-body">
                <ul id="noesia-swa-business-news" class="noesia-swa-news-list" data-noesia-swa-news-panel="business" aria-live="polite">
                    <li class="noesia-swa-news-item noesia-swa-news-item--placeholder"><?php esc_html_e( 'Loading headlines…', 'noesia-smart-waiter' ); ?></li>
                </ul>
            </div>
        </div>

        <div class="noesia-swa-card noesia-swa-news-card" data-noesia-swa-news-card="health">
            <div class="noesia-swa-card-header">
                <div>
                    <h3><?php esc_html_e( '🩺 Health', 'noesia-smart-waiter' ); ?></h3>
                    <p class="noesia-swa-muted">
                        <?php esc_html_e( 'Top headlines', 'noesia-smart-waiter' ); ?>
                        · <?php esc_html_e( 'Country:', 'noesia-smart-waiter' ); ?>
                        <span id="noesia-swa-health-news-country">—</span>
                    </p>
                </div>
                <button type="button" class="button button-small noesia-swa-news-refresh" data-noesia-swa-news-refresh="health">↻</button>
            </div>
            <div class="noesia-swa-card-body">
                <ul id="noesia-swa-health-news" class="noesia-swa-news-list" data-noesia-swa-news-panel="health" aria-live="polite">
                    <li class="noesia-swa-news-item noesia-swa-news-item--placeholder"><?php esc_html_e( 'Loading headlines…', 'noesia-smart-waiter' ); ?></li>
                </ul>
            </div>
        </div>

        <div class="noesia-swa-card noesia-swa-news-card" data-noesia-swa-news-card="economy">
            <div class="noesia-swa-card-header">
                <div>
                    <h3><?php esc_html_e( '💶 Economy', 'noesia-smart-waiter' ); ?></h3>
                    <p class="noesia-swa-muted">
                        <?php esc_html_e( 'Top headlines', 'noesia-smart-waiter' ); ?>
                        · <?php esc_html_e( 'Country:', 'noesia-smart-waiter' ); ?>
                        <span id="noesia-swa-economy-news-country">—</span>
                    </p>
                </div>
                <button type="button" class="button button-small noesia-swa-news-refresh" data-noesia-swa-news-refresh="economy">↻</button>
            </div>
            <div class="noesia-swa-card-body">
                <ul id="noesia-swa-economy-news" class="noesia-swa-news-list" data-noesia-swa-news-panel="economy" aria-live="polite">
                    <li class="noesia-swa-news-item noesia-swa-news-item--placeholder"><?php esc_html_e( 'Loading headlines…', 'noesia-smart-waiter' ); ?></li>
                </ul>
            </div>
        </div>

        <div class="noesia-swa-card noesia-swa-news-card" data-noesia-swa-news-card="politics">
            <div class="noesia-swa-card-header">
                <div>
                    <h3><?php esc_html_e( '🏛️ Politics', 'noesia-smart-waiter' ); ?></h3>
                    <p class="noesia-swa-muted">
                        <?php esc_html_e( 'Top headlines', 'noesia-smart-waiter' ); ?>
                        · <?php esc_html_e( 'Country:', 'noesia-smart-waiter' ); ?>
                        <span id="noesia-swa-politics-news-country">—</span>
                    </p>
                </div>
                <button type="button" class="button button-small noesia-swa-news-refresh" data-noesia-swa-news-refresh="politics">↻</button>
            </div>
            <div class="noesia-swa-card-body">
                <ul id="noesia-swa-politics-news" class="noesia-swa-news-list" data-noesia-swa-news-panel="politics" aria-live="polite">
                    <li class="noesia-swa-news-item noesia-swa-news-item--placeholder"><?php esc_html_e( 'Loading headlines…', 'noesia-smart-waiter' ); ?></li>
                </ul>
            </div>
        </div>

        <div class="noesia-swa-card noesia-swa-news-card" data-noesia-swa-news-card="world">
            <div class="noesia-swa-card-header">
                <div>
                    <h3><?php esc_html_e( '🌍 World', 'noesia-smart-waiter' ); ?></h3>
                    <p class="noesia-swa-muted">
                        <?php esc_html_e( 'Top headlines', 'noesia-smart-waiter' ); ?>
                        · <?php esc_html_e( 'Country:', 'noesia-smart-waiter' ); ?>
                        <span id="noesia-swa-world-news-country">—</span>
                    </p>
                </div>
                <button type="button" class="button button-small noesia-swa-news-refresh" data-noesia-swa-news-refresh="world">↻</button>
            </div>
            <div class="noesia-swa-card-body">
                <ul id="noesia-swa-world-news" class="noesia-swa-news-list" data-noesia-swa-news-panel="world" aria-live="polite">
                    <li class="noesia-swa-news-item noesia-swa-news-item--placeholder"><?php esc_html_e( 'Loading headlines…', 'noesia-smart-waiter' ); ?></li>
                </ul>
            </div>
        </div>

    </div>
</div>
