<?php
namespace Bookaro\Service;

defined( 'ABSPATH' ) || exit;

use Bookaro\Contracts\CalendarSyncInterface;

/**
 * No-op calendar sync for Lite builds.
 */
class NullCalendarSync implements CalendarSyncInterface
{
    public function is_connected( int $user_id ): bool
    {
        return false;
    }

    public function push_event(
        int $user_id,
        $booking,
        bool $cancelled = false,
        bool $for_owner = false
    ): string|\WP_Error|null {
        return new \WP_Error(
            'bookaro_pro_required',
            __( 'Available in MyBookaro Pro.', 'mybookaro' )
        );
    }

    public function update_event(
        int $user_id,
        $booking,
        bool $cancelled = false,
        string $event_id = '',
        bool $for_owner = false
    ): string|\WP_Error|null {
        return new \WP_Error(
            'bookaro_pro_required',
            __( 'Available in MyBookaro Pro.', 'mybookaro' )
        );
    }

    public function cancel_event(
        int $user_id,
        $booking,
        string $event_id = '',
        bool $for_owner = false
    ): string|\WP_Error|null {
        return new \WP_Error(
            'bookaro_pro_required',
            __( 'Available in MyBookaro Pro.', 'mybookaro' )
        );
    }

    public function sync_pending(): void
    {
        // Intentionally no-op.
    }
}
