<?php if (!defined('DASHBOARD_ROOT')) { http_response_code(403); exit; } RBAC::enforce('view.store'); require_once __DIR__ . '/../modules/store/store_data.php'; ?> <div class="ws-header"> <div class="ws-brand"> <span class="ws-dot" style="background:<?= UI::e($wsColor) ?>;color:<?= UI::e($wsColor) ?>"></span> <span class="ws-name"><?= UI::e($wsName) ?></span> <span class="ws-domain"><?= UI::e($wsDomain) ?></span> </div> <div style="display:flex;align-items:center;gap:10px"><span class="ws-pill ws-pill-ok">Live</span></div> </div> <div class="ws-tabs" style="display:flex;gap:0;border-bottom:1px solid rgba(255,255,255,.08);margin-bottom:24px"> <a href="?view=store&id=<?= $wsStoreId ?>&action=products" class="ws-tab<?= $activeTab === 'products' ? ' ws-tab-active' : '' ?>" style="padding:14px 28px;font-size:12px;font-weight:700;letter-spacing:1px;text-transform:uppercase;text-decoration:none;color:<?= $activeTab === 'products' ? '#fff' : 'rgba(200,204,212,.4)' ?>;border-bottom:2px solid <?= $activeTab === 'products' ? 'var(--accent,#4ade80)' : 'transparent' ?>;transition:all .2s"> <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="vertical-align:-2px;margin-right:6px"><path d="M6 2L3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z"/><line x1="3" y1="6" x2="21" y2="6"/><path d="M16 10a4 4 0 0 1-8 0"/></svg>PRODUCTS</a> <a href="?view=store&id=<?= $wsStoreId ?>&action=config" class="ws-tab<?= $activeTab === 'config' ? ' ws-tab-active' : '' ?>" style="padding:14px 28px;font-size:12px;font-weight:700;letter-spacing:1px;text-transform:uppercase;text-decoration:none;color:<?= $activeTab === 'config' ? '#fff' : 'rgba(200,204,212,.4)' ?>;border-bottom:2px solid <?= $activeTab === 'config' ? 'var(--accent,#4ade80)' : 'transparent' ?>;transition:all .2s"> <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="vertical-align:-2px;margin-right:6px"><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"/></svg>CONFIGURATION</a> </div> <?php if ($activeTab === 'products') { switch ($wsAction) { case 'new_product': case 'edit_product': if ($wsAction === 'new_product') $_GET['action'] = 'new'; if ($wsAction === 'edit_product') $_GET['action'] = 'edit'; require_once DASHBOARD_ROOT . '/modules/store/listings.php'; break; case 'new_block': $_GET['action'] = 'new'; require_once DASHBOARD_ROOT . '/modules/store/blocks.php'; break; case 'layout': require_once DASHBOARD_ROOT . '/modules/store/row_builder.php'; break; case 'manage': require_once DASHBOARD_ROOT . '/modules/store/content_editor.php'; break; default: require_once DASHBOARD_ROOT . '/modules/store/products.php'; break; } } if ($activeTab === 'config') { require_once DASHBOARD_ROOT . '/modules/store/store_config.php'; }  ?> <script src="/dashboard/assets/js/block-wizard.js" nonce="<?= $cspNonce ?? '' ?>"></script>