#pragma once

#include <string_view>

namespace pp::app {

enum class PickedPathAction {
    ignore_empty_path,
    invoke_callback,
};

enum class DisplayFileAction {
    ignore_empty_path,
    open_external_file,
};

enum class VirtualKeyboardAction {
    show_keyboard,
    hide_keyboard,
};

enum class CursorVisibilityAction {
    show_cursor,
    hide_cursor,
};

enum class ClipboardReadAction {
    read_text,
};

enum class ClipboardWriteAction {
    write_text,
};

[[nodiscard]] constexpr PickedPathAction plan_picked_path(std::string_view path) noexcept
{
    return path.empty()
        ? PickedPathAction::ignore_empty_path
        : PickedPathAction::invoke_callback;
}

[[nodiscard]] constexpr DisplayFileAction plan_display_file(std::string_view path) noexcept
{
    return path.empty()
        ? DisplayFileAction::ignore_empty_path
        : DisplayFileAction::open_external_file;
}

[[nodiscard]] constexpr VirtualKeyboardAction plan_virtual_keyboard(bool visible) noexcept
{
    return visible
        ? VirtualKeyboardAction::show_keyboard
        : VirtualKeyboardAction::hide_keyboard;
}

[[nodiscard]] constexpr CursorVisibilityAction plan_cursor_visibility(bool visible) noexcept
{
    return visible
        ? CursorVisibilityAction::show_cursor
        : CursorVisibilityAction::hide_cursor;
}

[[nodiscard]] constexpr ClipboardReadAction plan_clipboard_read() noexcept
{
    return ClipboardReadAction::read_text;
}

[[nodiscard]] constexpr ClipboardWriteAction plan_clipboard_write(std::string_view) noexcept
{
    return ClipboardWriteAction::write_text;
}

}
