#pragma once

#include "platform_api/platform_services.h"

#include <functional>
#include <memory>
#include <string_view>

namespace pp::platform::android {

struct AndroidPlatformBridge {
    std::function<std::string()> clipboard_text;
    std::function<bool(std::string_view text)> set_clipboard_text;
    std::function<void(bool visible)> set_virtual_keyboard_visible;
    std::function<void()> attach_ui_thread;
    std::function<void()> detach_ui_thread;
    std::function<void()> acquire_render_context;
    std::function<void()> release_render_context;
    std::function<void()> present_render_context;
    std::function<void(PickedPathCallback callback)> pick_file;
    std::function<void(PickedPathCallback callback)> pick_save_file;
};

struct AndroidPlatformServicesConfig {
    AndroidPlatformBridge bridge;
    std::shared_ptr<pp::platform::PlatformStoragePaths> storage_paths;
};

[[nodiscard]] std::unique_ptr<pp::platform::PlatformServices> create_platform_services(
    AndroidPlatformServicesConfig config = {});

}
