<?php

declare(strict_types=1);

namespace App\Framework\Design;

use App\Framework\Design\ValueObjects\ThemeMode;

/**
 * Theme Interface
 *
 * Generic interface for theme implementations across the framework.
 * Allows different parts of the application (Admin, Frontend, Emails, etc.)
 * to implement consistent theme switching and management.
 */
interface Theme
{
    /**
     * Get the current theme mode
     */
    public function getMode(): ThemeMode;

    /**
     * Get data-theme attribute value for HTML
     */
    public function toDataAttribute(): string;

    /**
     * Get CSS class for theme
     */
    public function toCssClass(): string;

    /**
     * Check if theme requires JavaScript preference detection
     */
    public function requiresPreferenceDetection(): bool;

    /**
     * Get storage key for persisting theme preference
     */
    public function getStorageKey(): string;

    /**
     * Serialize theme for JSON storage
     */
    public function toJson(): string;

    /**
     * Check equality with another theme
     */
    public function equals(self $other): bool;

    /**
     * Get string representation
     */
    public function toString(): string;
}
