<?php

namespace App\Enums;

enum LandingPageVersion: string
{
    case ProblemSolution = 'problem_solution';
    case Benefits = 'benefits';
    case Features = 'features';
    case Offer = 'offer';
    case Trust = 'trust';
    case Comparison = 'comparison';

    /**
     * @return list<self>
     */
    public static function forLayout(LandingPageLayoutMode $mode): array
    {
        return match ($mode) {
            LandingPageLayoutMode::Unique, LandingPageLayoutMode::Template, LandingPageLayoutMode::Catalog => self::cases(),
        };
    }

    public function label(): string
    {
        return match ($this) {
            self::ProblemSolution => 'Problem → Solution',
            self::Benefits => 'Benefits-focused',
            self::Features => 'Product features',
            self::Offer => 'Promotional offer',
            self::Trust => 'Trust & social proof',
            self::Comparison => 'Comparison',
        };
    }

    public function layoutInstructions(): string
    {
        return match ($this) {
            self::ProblemSolution => 'Must include all the products in the catalog. Use a two-column layout: left column lists customer pain points, right column positions all catalog products as the solution. Then include a card for every catalog product with its image, details, and CTA. End with a sticky bottom CTA bar. Hero is secondary to the problem/solution split.',
            self::Benefits => 'Must include all the products in the catalog. Use stacked full-width lifestyle bands. Include a band or card for every catalog product showing that product\'s outcome. No feature spec tables. CTA appears after the first two outcome bands.',
            self::Features => 'Must include all the products in the catalog. Lead with a capabilities spec grid and an accordion of technical differentiators that covers every catalog product. Do not use a large hero-first layout. CTA sits beside the spec grid.',
            self::Offer => 'Must include all the products in the catalog. Lead with a full-width promotional offer bar, a coupon-style CTA, and countdown markup (static remaining-time display is fine). Include a deal card for every catalog product. Urgency and discount copy dominate the page.',
            self::Trust => 'Must include all the products in the catalog. Lead with review quotes, star ratings, guarantee strip, and credibility logos. Then include a trust card for every catalog product. Social proof is the first content below the header. CTA is paired with a guarantee line.',
            self::Comparison => 'Must include all the products in the catalog. Lead with a comparison table versus 2–3 generic alternatives. Include a row or card for every catalog product. Highlight why these products are better value. Do not use a hero-image-first layout.',
        };
    }

    public function angleInstructions(): string
    {
        return match ($this) {
            self::ProblemSolution => 'Must include all the products in the catalog. Highlight customer pain points. Position all catalog products as the solution. Use each product\'s researched details. Focus on emotional triggers and benefits.',
            self::Benefits => 'Must include all the products in the catalog. Highlight lifestyle improvements and outcomes for every catalog product. Focus on why customers need these products.',
            self::Features => 'Must include all the products in the catalog. Showcase capabilities for every catalog product. Explain technical advantages and differentiators for each one.',
            self::Offer => 'Must include all the products in the catalog. Focus on discounts, limited-time offers, deals, and urgency for every catalog product. Encourage immediate action.',
            self::Trust => 'Must include all the products in the catalog. Highlight reviews, ratings, testimonials, guarantees, and credibility for every catalog product.',
            self::Comparison => 'Must include all the products in the catalog. Compare all catalog products against common alternatives. Highlight why these products provide better value.',
        };
    }
}
