31 lines
839 B
PHP
31 lines
839 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Support\ReviewPacks;
|
|
|
|
final class CustomerOutputGateDecision
|
|
{
|
|
/**
|
|
* @param array<string, mixed> $readiness
|
|
* @param array<string, mixed> $guidance
|
|
*/
|
|
public function __construct(
|
|
public readonly string $state,
|
|
public readonly string $guidanceState,
|
|
public readonly bool $hasReadyArtifact,
|
|
public readonly bool $canStreamCustomerOutput,
|
|
public readonly bool $canStreamInternalPreview,
|
|
public readonly string $reason,
|
|
public readonly array $readiness = [],
|
|
public readonly array $guidance = [],
|
|
) {}
|
|
|
|
public function canStream(bool $internalPreview): bool
|
|
{
|
|
return $internalPreview
|
|
? $this->canStreamInternalPreview
|
|
: $this->canStreamCustomerOutput;
|
|
}
|
|
}
|