<?php
/**
 * Booking Service Interface
 *
 * Interface for booking service operations
 *
 * @package NemtlyBooking
 * @since   PBOOKING_SINCE
 */

namespace NemtlyBooking\Interfaces;

use NemtlyBooking\Models\Booking;

/**
 * Booking Service Interface
 *
 * @since PBOOKING_SINCE
 */
interface Booking_Service_Interface extends Service_Interface {

    /**
     * Create a new booking
     *
     * @since PBOOKING_SINCE
     *
     * @param array $data Booking data.
     *
     * @return Booking|WP_Error Created booking object or error.
     */
    public function create_booking( $data );

    /**
     * Update booking status
     *
     * @since PBOOKING_SINCE
     *
     * @param int    $booking_id Booking ID.
     * @param string $status    New status.
     *
     * @return bool|WP_Error True on success, error on failure.
     */
    public function update_booking_status( $booking_id, $status );

    /**
     * Cancel a booking
     *
     * @since PBOOKING_SINCE
     *
     * @param int $booking_id Booking ID.
     *
     * @return bool|WP_Error True on success, error on failure.
     */
    public function cancel_booking( $booking_id );

    /**
     * Confirm a booking
     *
     * @since PBOOKING_SINCE
     *
     * @param int $booking_id Booking ID.
     *
     * @return bool|WP_Error True on success, error on failure.
     */
    public function confirm_booking( $booking_id );

    /**
     * Get bookings for an event
     *
     * @since PBOOKING_SINCE
     *
     * @param int   $event_id Event ID.
     * @param array $args    Query arguments.
     *
     * @return array Array of booking objects.
     */
    public function get_bookings_for_event( $event_id, $args = [] );

    /**
     * Get bookings for a user
     *
     * @since PBOOKING_SINCE
     *
     * @param int   $user_id User ID.
     * @param array $args    Query arguments.
     *
     * @return array Array of booking objects.
     */
    public function get_bookings_for_user( $user_id, $args = [] );

    /**
     * Check booking availability
     *
     * @since PBOOKING_SINCE
     *
     * @param int $event_id Event ID.
     *
     * @return bool|WP_Error True if available, error on failure.
     */
    public function check_availability( $event_id );

    /**
     * Get booking statistics
     *
     * @since PBOOKING_SINCE
     *
     * @return array Statistics data.
     */
    public function get_booking_statistics();

    /**
     * Validate booking data
     *
     * @since PBOOKING_SINCE
     *
     * @param array $data Booking data.
     *
     * @return bool|WP_Error True if valid, error on failure.
     */
    public function validate_booking_data( $data );
}
