<?php
namespace Laravel\Prompts;
use Closure;
use Illuminate\Support\Collection;
class SuggestPrompt extends Prompt
{
use Concerns\Scrolling;
use Concerns\Truncation;
use Concerns\TypedValue;
public array|Closure $options;
protected ?array $matches = null;
public function __construct(
public string $label,
array|Collection|Closure $options,
public string $placeholder = '',
public string $default = '',
public int $scroll = 5,
public bool|string $required = false,
public mixed $validate = null,
public string $hint = '',
) {
$this->options = $options instanceof Collection ? $options->all() : $options;
$this->initializeScrolling(null);