<?php

declare(strict_types=1);

namespace Numinix\SeekmodoWordPress\Elementor;

/**
 * Sprint 11 PR 2 — registers a "Seekmodo" widget category in
 * Elementor's panel so the four widgets group together cleanly
 * instead of scattering across the default categories.
 */
final class Category
{
    public const SLUG = 'seekmodo';

    /**
     * @param object $elementsManager Elementor's `Elements_Manager`.
     */
    public static function register($elementsManager): void
    {
        if (!is_object($elementsManager) || !method_exists($elementsManager, 'add_category')) {
            return;
        }

        $elementsManager->add_category(
            self::SLUG,
            [
                'title' => function_exists('esc_html__')
                    ? esc_html__('Seekmodo', 'seekmodo')
                    : 'Seekmodo',
                'icon'  => 'eicon-search-bold',
            ]
        );
    }
}
