<?php
namespace Bookaro\Contracts;

defined( 'ABSPATH' ) || exit;

/**
 * Abstraction for payments/order processing (WooCommerce in Pro).
 */
interface PaymentsGatewayInterface
{
    public function is_available(): bool;

    public function get_payment_mode(): string;

    /**
     * Create an order for a booking.
     *
     * @return array|\WP_Error { order_id:int, checkout_url:string }
     */
    public function create_order( int $booking_id, array $data );

    /**
     * Sync booking dates to an existing order.
     */
    public function sync_booking_order( int $order_id, string $booking_date, ?string $booking_date_to ): void;

    public function is_booking_paid( \Bookaro\Entity\Booking $booking ): bool;

    /**
     * Currency/format settings for frontend price rendering.
     *
     * @return array{symbol?:string, format?:string, decimals?:int, decimal_separator?:string, thousand_separator?:string}
     */
    public function get_currency_settings(): array;

    /**
     * Format a price for display.
     */
    public function format_price( float $amount ): string;

    /**
     * Return order status labels for mapping (slug => label).
     */
    public function get_order_status_options(): array;
}
