#pragma once // Spec: shell.md section 9. Value describing a native alert; built from an Error with the Swift mapping: // Cancelled gives no alert, Local shows its message, API-class errors with a status and a non-specific message // show "() ", everything else shows the message. #include #include "core/Result.hpp" namespace dp { class AlertMessage { public: bool isPresented = false; std::string title; std::string message; std::string buttonText; static AlertMessage none(); static AlertMessage presentedError(const std::string& message); static AlertMessage presentedError(const Error& error); static AlertMessage presentedMessage(const std::string& message); }; } // namespace dp