public function confirm(string $message, string $default = null): bool
    {
        $result = null;
        while (null === $result) {
            $result = $this->prompt($message)->ifIsOneOf(['y', 'Y', 'n', 'N', '']);
            if ('' === $result) {
                $result = ((null !== $default) ? ($default) : (null));
            }
        }

        return strtolower($result) === 'y';
    }