<?php

namespace App\SiteReadiness\Checks;

use App\SiteReadiness\CheckResult;
use App\SiteReadiness\ReadinessCheck;
use App\SiteReadiness\Status;

class AnalyticsIdCheck implements ReadinessCheck
{
    public function group(): string { return 'Integrations'; }
    public function label(): string { return 'Analytics / GTM configured'; }
    public function hint(): string { return 'Set the GTM ID (SITE_GTM_ID) in .env / site settings.'; }

    public function run(): CheckResult
    {
        if (!empty(config('site.gtm_id'))) {
            return new CheckResult(Status::OK, 'GTM ID set.');
        }

        return new CheckResult(Status::WARN, 'No GTM/analytics ID configured.');
    }
}
