<?php
namespace Bookaro\Contracts;

defined( 'ABSPATH' ) || exit;

/**
 * Abstraction for calendar sync providers (e.g. Google Calendar in Pro).
 */
interface CalendarSyncInterface
{
    public function is_connected( int $user_id ): bool;

    public function push_event(
        int $user_id,
        $booking,
        bool $cancelled = false,
        bool $for_owner = false
    ): string|\WP_Error|null;

    public function update_event(
        int $user_id,
        $booking,
        bool $cancelled = false,
        string $event_id = '',
        bool $for_owner = false
    ): string|\WP_Error|null;

    public function cancel_event(
        int $user_id,
        $booking,
        string $event_id = '',
        bool $for_owner = false
    ): string|\WP_Error|null;

    public function sync_pending(): void;
}
