<?php
// components/MainTemplate/WizardSteps.php
namespace Components\MainTemplate;

class WizardSteps
{
    public const STEP_GALLERY = 'gallery';
    public const STEP_NAMING = 'naming';
    public const STEP_CONTINUE = 'continue';

    /**
     * Get the wizard steps.
     *
     * @return array
     */
    public static function getSteps(): array
    {
        return [
            [
                'id' => self::STEP_GALLERY,
                'label' => (string)\mh_lng('UI_STEP_MAIN_TEMPLATE_GALLERY', 'Select from gallery'),
                'description' => (string)\mh_lng('UI_STEP_MAIN_TEMPLATE_GALLERY_DESC', 'Choose a starting design'),
            ],
            [
                'id' => self::STEP_NAMING,
                'label' => (string)\mh_lng('UI_STEP_MAIN_TEMPLATE_NAMING', 'Name your template'),
                'description' => (string)\mh_lng('UI_STEP_MAIN_TEMPLATE_NAMING_DESC', 'Set a clear internal template name'),
            ],
            [
                'id' => self::STEP_CONTINUE,
                'label' => (string)\mh_lng('UI_STEP_MAIN_TEMPLATE_CONTINUE', 'Continue'),
                'description' => (string)\mh_lng('UI_STEP_MAIN_TEMPLATE_CONTINUE_DESC', 'Open the editor now or return to templates'),
            ],
        ];
    }

    /**
     * Render the Stepper component for the current wizard state.
     *
     * @param string $currentStepId
     * @return string
     */
    public static function renderStepper(string $currentStepId): string
    {
        $steps = self::getSteps();
        $stepper = \Components\Ui\Stepper::render($steps, $currentStepId);
        return '<div class="absolute z-100 w-full px-6 py-4 border-b border-zinc-200 bg-zinc-50/80 -m-6 ">' . $stepper . '</div><div class="h-18"></div>';
    }
}
