match (true) { ! $value => 'Please enter your name.', default => null, }, ); $path = text( label: 'Where should we create your project?', placeholder: 'E.g. ./laravel', validate: fn ($value) => match (true) { ! $value => 'Please enter a path', $value[0] !== '.' => 'Please enter a relative path', default => null, }, ); $password = password( label: 'Provide a password', validate: fn ($value) => match (true) { ! $value => 'Please enter a password.', strlen($value) < 5 => 'Password should have at least 5 characters.', default => null, }, ); $type = select( label: 'Pick a project type', default: 'ts', options: [ 'ts' => 'TypeScript', 'js' => 'JavaScript', ], ); $tools = multiselect( label: 'Select additional tools.', default: ['pint', 'eslint'], options: [ 'pint' => 'Pint', 'eslint' => 'ESLint', 'prettier' => 'Prettier', ], validate: function ($values) { if (count($values) === 0) { return 'Please select at least one tool.'; } } ); $install = confirm( label: 'Install dependencies?', ); if ($install) { spin(fn () => sleep(3), 'Installing dependencies...'); } error('Error'); warning('Warning'); alert('Alert'); note(<<