#pragma once

#include <string>
#include <plugin.h>

namespace blogi {
namespace social {

    /// Abstract base for social network sharing backends
    class SocialBackend {
    public:
        virtual ~SocialBackend() = default;
        /// Return the network name (e.g. "facebook", "instagram")
        virtual const std::string name() const = 0;
        /// Which post types this backend supports
        virtual bool supports(SharePostType type) const = 0;
        /// Execute the share; url = public link, title/description = metadata
        virtual void share(const int tid, SharePostType type, const std::string &url,
                           const std::string &title, const std::string &description) = 0;
    };

} // namespace social
} // namespace blogi

