<?php

namespace App\Enums;

/**
 * Jenis iklan campaign (RPD §3.1).
 */
enum AdType: string
{
    case Affiliate = 'affiliate';
    case LinkWebsite = 'link_website';
    case Backlink = 'backlink';
    case PressRelease = 'press_release';

    public function label(): string
    {
        return match ($this) {
            self::Affiliate => 'Iklan Affiliate',
            self::LinkWebsite => 'Iklan Link Website',
            self::Backlink => 'Backlink / PBN',
            self::PressRelease => 'Press Release Portal Media',
        };
    }

    /**
     * Apakah jenis iklan ini butuh kode verifikasi (dipasang di web tujuan)?
     */
    public function needsVerification(): bool
    {
        return $this === self::LinkWebsite;
    }

    /**
     * Apakah jenis iklan ini sudah aktif (bukan coming soon)?
     */
    public function isActive(): bool
    {
        return in_array($this, [self::Affiliate, self::LinkWebsite], true);
    }
}
