<?php

namespace Dev4Press\Plugin\coreSocial\Networks;

use Dev4Press\Plugin\coreSocial\Base\Network;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

class Flipboard extends Network {
	protected string $network = 'flipboard';

	public static function instance() : Flipboard {
		static $instance = null;

		if ( ! isset( $instance ) ) {
			$instance = new Flipboard();
		}

		return $instance;
	}

	public function get_share_link( string $url, string $title, string $image_url = '', string $item = 'post', int $item_id = 0 ) : string {
		return sprintf( 'https://share.flipboard.com/bookmarklet/popout?v=2&url=%1$s&title=%2$s', esc_attr( $url ), urlencode( $title ) );
	}
}
