<?php

namespace Lucent\Setup\Step;

use Lucent\Setup\Data\SetupStep;

class LaravelEnvStep implements IStep
{

    public function __invoke(): SetupStep
    {
        $name = "Laravel ENV";
        $instructions = <<<EOD
# Make sure in your env that you APP_URL is the same as the one in your browser right now. Or the other way round. 
EOD;


        return match (config("lucent.url") === request()->getSchemeAndHttpHost()) {
            true => SetupStep::makeSuccess($name, $instructions),
            false => SetupStep::makeFail($name, $instructions),
        };
    }
}