<?php

namespace Calio\Support;

if (!defined('ABSPATH')) {
    exit;
}

/**
 * Defines WordPress dashboard modules independently from Elementor widgets.
 */
final class DashboardWidgetCatalog
{
    /**
     * @return array<string, array{title: string, summary: string, focus: string, requirement: string, requires_woocommerce?: bool}>
     */
    public static function all(): array
    {
        return [
            'calio-overview' => [
                'title' => __('Calio Addon Overview', 'calio-addon'),
                'summary' => __('Active Calio widget totals, enabled module names, plugin version, and the latest release notes.', 'calio-addon'),
                'focus' => __('Plugin status', 'calio-addon'),
                'requirement' => __('Calio Addon', 'calio-addon'),
            ],
            'live-inventory-hud' => [
                'title' => __('Live Inventory HUD', 'calio-addon'),
                'summary' => __('Live WooCommerce inventory monitoring with low-stock priority, instant search, refresh, and browser-based CSV export.', 'calio-addon'),
                'focus' => __('Stock monitoring', 'calio-addon'),
                'requirement' => __('WooCommerce', 'calio-addon'),
                'requires_woocommerce' => true,
            ],
            'order-processing-monitor' => [
                'title' => __('Order Processing Monitor', 'calio-addon'),
                'summary' => __('Seven-day WooCommerce revenue monitoring for completed, pending-action, and financially at-risk orders.', 'calio-addon'),
                'focus' => __('Revenue risk', 'calio-addon'),
                'requirement' => __('WooCommerce', 'calio-addon'),
                'requires_woocommerce' => true,
            ],
            'marketing-intelligence-hud' => [
                'title' => __('Marketing Intelligence HUD', 'calio-addon'),
                'summary' => __('Executive geography and traffic-source insights from the latest 25 WooCommerce orders.', 'calio-addon'),
                'focus' => __('Customer acquisition', 'calio-addon'),
                'requirement' => __('WooCommerce', 'calio-addon'),
                'requires_woocommerce' => true,
            ],
            'inline-products' => [
                'title' => __('Inline Products', 'calio-addon'),
                'summary' => __('A dedicated WooCommerce product management page with search, sorting, inline price editing, and description previews.', 'calio-addon'),
                'focus' => __('Product management', 'calio-addon'),
                'requirement' => __('WooCommerce', 'calio-addon'),
                'requires_woocommerce' => true,
            ],
        ];
    }

    /**
     * @return array<string, bool>
     */
    public static function defaults(): array
    {
        return [
            'calio-overview' => true,
            'live-inventory-hud' => true,
            'order-processing-monitor' => true,
            'marketing-intelligence-hud' => true,
            'inline-products' => true,
        ];
    }
}
