<?php

declare(strict_types=1);

namespace App\Domain\SmartLink\Enums;

enum LinkType: string
{
    case PRE_RELEASE = 'pre_release';
    case RELEASE = 'release';
    case BIO_LINK = 'bio_link';
    case EVENT = 'event';
    case CONTENT = 'content';
    case REWARD = 'reward';

    public function getLabel(): string
    {
        return match ($this) {
            self::PRE_RELEASE => 'Pre-Release / Pre-Save',
            self::RELEASE => 'Release / Album',
            self::BIO_LINK => 'Bio / Landing Page',
            self::EVENT => 'Event / Tickets',
            self::CONTENT => 'Content / Playlist',
            self::REWARD => 'Reward / Contest',
        };
    }

    public function getDescription(): string
    {
        return match ($this) {
            self::PRE_RELEASE => 'Pre-save campaign for upcoming releases',
            self::RELEASE => 'Album or single release link',
            self::BIO_LINK => 'Artist bio or creator landing page',
            self::EVENT => 'Concert, tour or event tickets',
            self::CONTENT => 'Video, playlist or content promotion',
            self::REWARD => 'Contest, giveaway or reward campaign',
        };
    }

    public function requiresReleaseDate(): bool
    {
        return $this === self::PRE_RELEASE;
    }

    public function supportsMultipleSections(): bool
    {
        return $this === self::BIO_LINK;
    }

    public function isTimebound(): bool
    {
        return match ($this) {
            self::PRE_RELEASE, self::EVENT, self::REWARD => true,
            default => false,
        };
    }
}
