<?php
/**
 * BookiFlex
 *
 * @package   BookiFlex
 * @author    BookiFlex
 * @copyright Copyright (c) 2025 BookiFlex
 * @license   GPL-2.0-or-later
 *
 * @link      https://bookiflex.com
 */

declare(strict_types=1);

namespace BookiFlex\Plugin\Provider\Onboarding;

use BookiFlex\Core\Admin\CPT\CancellationPolicy;
use BookiFlex\Core\Model\AccommodationType\BookingUnitTypeInterface;
use BookiFlex\Core\Model\RatePlan\BoardType;
use BookiFlex\Extensions\Onboarding\Contract\OnboardingPresetsProviderInterface;
use BookiFlex\Extensions\Onboarding\ValueObject\OnboardingMode;
use BookiFlex\Core\Model\PaymentType\PaymentTypeInterface;

defined( 'ABSPATH' ) || exit;

/**
 * Apartment-Focused Onboarding Presets Provider (Free Version)
 *
 * Provides predefined cancellation policies and payment types for vacation rental businesses.
 * These presets feature apartment-based accommodations with flexible and prepaid rate plans.
 *
 * @package BookiFlex\Plugin\Extensions\Onboarding
 * @since   1.0.0
 */
class RentalUnitPresetsProvider implements OnboardingPresetsProviderInterface
{
    /**
     * {@inheritDoc}
     */
    public function getCancellationPolicies(): array
    {
        return [
            [
                'cancellation_key' => 'fully_flexible',
                'title' => __('Flexible – free cancellation anytime', 'bookiflex'),
                'excerpt' => __('Free cancellation at any time, no penalty will be charged.', 'bookiflex'),
                'status' => 'publish',
                'predefined_rule' => CancellationPolicy::RULE_FULLY_FLEXIBLE,
            ],
	        [
		        'cancellation_key' => 'strict_24h',
		        'title' => __('Strict (100% within 24 hours)', 'bookiflex'),
		        'excerpt' => __('Free cancellation up to 24 hours before check-in. Cancellations within 24 hours will incur 100%.', 'bookiflex'),
		        'status' => 'publish',
		        'predefined_rule' => CancellationPolicy::RULE_STRICT,
		        'strict_time_window' => '24',
		        'strict_penalty_percent' => '100',
	        ],
            [
                'cancellation_key' => 'strict_72h',
                'title' => __('Strict (100% within 72 hours)', 'bookiflex'),
                'excerpt' => __('Free cancellation up to 72 hours before check-in. Cancellations within 72 hours will incur 100%.', 'bookiflex'),
                'status' => 'publish',
                'predefined_rule' => CancellationPolicy::RULE_STRICT,
                'strict_time_window' => '72',
                'strict_penalty_percent' => '100',
            ],
            [
                'cancellation_key' => 'strict_7d',
                'title' => __('Strict (100% within 7 days)', 'bookiflex'),
                'excerpt' => __('Free cancellation up to 7 days before check-in. Cancellations within 7 days will incur 100%.', 'bookiflex'),
                'status' => 'publish',
                'predefined_rule' => CancellationPolicy::RULE_STRICT,
                'strict_time_window' => '168',
                'strict_penalty_percent' => '100',
            ],
            [
                'cancellation_key' => 'strict_72h_20',
                'title' => __('Moderate (20% within 72 hours)', 'bookiflex'),
                'excerpt' => __('Free cancellation up to 72 hours before check-in. Cancellations within 72 hours will incur a 20% penalty.', 'bookiflex'),
                'status' => 'publish',
                'predefined_rule' => CancellationPolicy::RULE_STRICT,
                'strict_time_window' => '72',
                'strict_penalty_percent' => '20',
            ],
            [
                'cancellation_key' => 'strict_72h_50',
                'title' => __('Strict (50% within 72 hours)', 'bookiflex'),
                'excerpt' => __('Free cancellation up to 72 hours before check-in. Cancellations within 72 hours will incur a 50% penalty.', 'bookiflex'),
                'status' => 'publish',
                'predefined_rule' => CancellationPolicy::RULE_STRICT,
                'strict_time_window' => '72',
                'strict_penalty_percent' => '50',
            ],
            [
                'cancellation_key' => 'non_refundable',
                'title' => __('Non-refundable', 'bookiflex'),
                'excerpt' => __('Cancellation at any time will incur a 100% charge of the booking amount.', 'bookiflex'),
                'status' => 'publish',
                'predefined_rule' => CancellationPolicy::RULE_NON_REFUNDABLE,
            ],
        ];
    }

    /**
     * {@inheritDoc}
     */
    public function getPaymentTypes(): array
    {
        return [
            [
                'payment_key' => 'pay_on_arrival',
                'title' => __('Payment on arrival', 'bookiflex'),
                'excerpt' => __('No prepayment required. The full amount is paid upon arrival at the property.', 'bookiflex'),
                'status' => 'publish',
                'calculator_type' => PaymentTypeInterface::PAYMENT_ON_ARRIVAL_TYPE,
                'payment_system' => 'offline',
	            'payment_availability_condition' => PaymentTypeInterface::ABA_GTE_TYPE,
	            'payment_availability_value' => 0,
	            'payment_availability_period' => PaymentTypeInterface::ABA_DAYS_PERIOD,
            ],
            [
                'payment_key' => 'prepayment_card_20',
                'title' => __('Card prepayment (20%)', 'bookiflex'),
                'excerpt' => __('20% of the total amount is charged immediately by card after booking. The remaining balance is paid on arrival.', 'bookiflex'),
                'status' => 'publish',
                'calculator_type' => PaymentTypeInterface::INTERNET_PAYMENT_TYPE,
                'payment_payable' => true,
                'payment_system' => 'stripe_checkout_session',
                'payment_authorization' => false,
                'time_for_confirmation' => 2,
                'prepayment_type' => PaymentTypeInterface::AMOUNT_PREPAYMENT_TYPE,
                'prepayment_value' => 20,
                'payment_availability_condition' => PaymentTypeInterface::ABA_GTE_TYPE,
                'payment_availability_value' => 0,
                'payment_availability_period' => PaymentTypeInterface::ABA_DAYS_PERIOD,
            ],
            [
                'payment_key' => 'prepayment_card_50',
                'title' => __('Card prepayment (50%)', 'bookiflex'),
                'excerpt' => __('50% of the total amount is charged immediately by card after booking. The remaining balance is paid on arrival.', 'bookiflex'),
                'status' => 'publish',
                'calculator_type' => PaymentTypeInterface::INTERNET_PAYMENT_TYPE,
                'payment_payable' => true,
                'payment_system' => 'stripe_checkout_session',
                'payment_authorization' => false,
                'time_for_confirmation' => 2,
                'prepayment_type' => PaymentTypeInterface::AMOUNT_PREPAYMENT_TYPE,
                'prepayment_value' => 50,
                'payment_availability_condition' => PaymentTypeInterface::ABA_GTE_TYPE,
                'payment_availability_value' => 0,
                'payment_availability_period' => PaymentTypeInterface::ABA_DAYS_PERIOD,
            ],
            [
                'payment_key' => 'pay_online_full',
                'title' => __('Online payment (100%)', 'bookiflex'),
                'excerpt' => __('The full booking amount is charged online by card at the time of booking.', 'bookiflex'),
                'status' => 'publish',
                'calculator_type' => PaymentTypeInterface::INTERNET_PAYMENT_TYPE,
                'payment_payable' => true,
                'payment_system' => 'stripe_checkout_session',
                'payment_authorization' => false,
                'prepayment_type' => PaymentTypeInterface::AMOUNT_PREPAYMENT_TYPE,
                'prepayment_value' => 100,
                'time_for_confirmation' => 2,
                'payment_availability_condition' => PaymentTypeInterface::ABA_GTE_TYPE,
                'payment_availability_value' => 0,
                'payment_availability_period' => PaymentTypeInterface::ABA_DAYS_PERIOD,
            ],
            [
                'payment_key' => 'prepayment_bank_20',
                'title' => __('Bank transfer prepayment (20%)', 'bookiflex'),
                'excerpt' => __('20% of the total amount must be paid by bank transfer within the specified time. Payment details will be sent by email after booking.', 'bookiflex'),
                'status' => 'publish',
                'calculator_type' => PaymentTypeInterface::BANK_PAYMENT_PAYABLE_TYPE,
                'payment_payable' => true,
                'payment_system' => 'offline',
                'payment_authorization' => false,
                'time_for_confirmation' => 72,
                'prepayment_type' => PaymentTypeInterface::AMOUNT_PREPAYMENT_TYPE,
                'prepayment_value' => 20,
                'payment_availability_condition' => PaymentTypeInterface::ABA_GTE_TYPE,
                'payment_availability_value' => 0,
                'payment_availability_period' => PaymentTypeInterface::ABA_DAYS_PERIOD,
            ],
            [
                'payment_key' => 'prepayment_bank_50',
                'title' => __('Bank transfer prepayment (50%)', 'bookiflex'),
                'excerpt' => __('50% of the total amount must be paid by bank transfer within the specified time. Payment details will be sent by email after booking.', 'bookiflex'),
                'status' => 'publish',
                'calculator_type' => PaymentTypeInterface::BANK_PAYMENT_PAYABLE_TYPE,
                'payment_payable' => true,
                'payment_system' => 'offline',
                'payment_authorization' => false,
                'time_for_confirmation' => 72,
                'prepayment_type' => PaymentTypeInterface::AMOUNT_PREPAYMENT_TYPE,
                'prepayment_value' => 50,
                'payment_availability_condition' => PaymentTypeInterface::ABA_GTE_TYPE,
                'payment_availability_value' => 0,
                'payment_availability_period' => PaymentTypeInterface::ABA_DAYS_PERIOD,
            ],
        ];
    }

    /**
     * {@inheritDoc}
     */
    public function getNextStepsForMode(OnboardingMode $mode): array
    {
        return match ($mode) {
            OnboardingMode::QUICK_SETUP => [
                [
                    'title' => __('Add property photos', 'bookiflex'),
                    'description' => __('Upload high-quality photos of your apartments to attract guests', 'bookiflex'),
                    'icon' => '📸',
                ],
                [
                    'title' => __('Configure availability calendar', 'bookiflex'),
                    'description' => __('Set up your booking calendar and blocked dates for each property', 'bookiflex'),
                    'icon' => '📅',
                ],
                [
                    'title' => __('Connect payment gateway', 'bookiflex'),
                    'description' => __('Set up Stripe for secure online prepayments', 'bookiflex'),
                    'icon' => '💳',
                ],
                [
                    'title' => __('Customize booking experience', 'bookiflex'),
                    'description' => __('Personalize the booking widget to match your brand', 'bookiflex'),
                    'icon' => '🎨',
                ],
            ],
            OnboardingMode::TEST_DATA => [
                [
                    'title' => __('Explore apartment listings', 'bookiflex'),
                    'description' => __('Review the sample apartments and understand the booking flow', 'bookiflex'),
                    'icon' => '📋',
                ],
                [
                    'title' => __('Replace with your properties', 'bookiflex'),
                    'description' => __('Delete test data and add your actual apartment properties', 'bookiflex'),
                    'icon' => '🔄',
                ],
                [
                    'title' => __('Set up guest communications', 'bookiflex'),
                    'description' => __('Customize booking confirmation and guest reminder emails', 'bookiflex'),
                    'icon' => '✉️',
                ],
            ],
            OnboardingMode::MANUAL_CONFIG => [
                [
                    'title' => __('Add your apartments', 'bookiflex'),
                    'description' => __('Create listings for your vacation rental properties', 'bookiflex'),
                    'icon' => '🏠',
                ],
                [
                    'title' => __('Configure pricing strategies', 'bookiflex'),
                    'description' => __('Set up rate plans with seasonal pricing and discounts', 'bookiflex'),
                    'icon' => '💰',
                ],
                [
                    'title' => __('Define booking policies', 'bookiflex'),
                    'description' => __('Configure cancellation policies and payment methods', 'bookiflex'),
                    'icon' => '📜',
                ],
                [
                    'title' => __('Embed booking widget', 'bookiflex'),
                    'description' => __('Add the booking widget to your website', 'bookiflex'),
                    'icon' => '🔗',
                ],
            ],
        };
    }

    /**
     * {@inheritDoc}
     */
    public function getTestDataConfiguration(): array
    {
        $apartmentDescriptions = $this->getDescriptionsByUnitType(BookingUnitTypeInterface::RENTAL_UNIT);

        return [
            'currency' => 'USD',

            // Accommodations WITHOUT pricing
            'accommodationTypes' => [
                // Index 0: Studio Apartment
                [
                    'name' => __('Studio Apartment', 'bookiflex'),
                    'mainPlaces' => 2,
                    'unitType' => BookingUnitTypeInterface::RENTAL_UNIT,
                    'availableUnits' => 1,
                    'address' => '123 Main Street, Apt 201, New York, NY 10001',
                    'description' => $apartmentDescriptions[array_rand($apartmentDescriptions)],
                    'amenities' => [
                        __('Wi-Fi', 'bookiflex'),
                        __('Kitchenette', 'bookiflex'),
                        __('Smart TV', 'bookiflex'),
                        __('Air Conditioning', 'bookiflex'),
                        __('Coffee Machine', 'bookiflex'),
                        __('Workspace', 'bookiflex'),
                        __('Private Bathroom', 'bookiflex'),
                    ],
                ],
                // Index 1: One-Bedroom Apartment
//                [
//                    'name' => __('One-Bedroom Apartment', 'bookiflex'),
//                    'mainPlaces' => 3,
//                    'unitType' => BookingUnitTypeInterface::RENTAL_UNIT,
//                    'availableUnits' => 1,
//                    'address' => '456 Park Avenue, Unit 5B, New York, NY 10022',
//                    'description' => $apartmentDescriptions[array_rand($apartmentDescriptions)],
//                    'amenities' => [
//                        __('Wi-Fi', 'bookiflex'),
//                        __('Full Kitchen', 'bookiflex'),
//                        __('Washing Machine', 'bookiflex'),
//                        __('Smart TV', 'bookiflex'),
//                        __('Air Conditioning', 'bookiflex'),
//                        __('Dining Area', 'bookiflex'),
//                        __('Workspace', 'bookiflex'),
//                    ],
//                ],
                // Index 2: Two-Bedroom Apartment
                [
                    'name' => __('Two-Bedroom Apartment', 'bookiflex'),
                    'mainPlaces' => 5,
                    'unitType' => BookingUnitTypeInterface::RENTAL_UNIT,
                    'availableUnits' => 1,
                    'address' => '789 Broadway, Apartment 12C, New York, NY 10003',
                    'description' => $apartmentDescriptions[array_rand($apartmentDescriptions)],
                    'amenities' => [
                        __('Wi-Fi', 'bookiflex'),
                        __('Full Kitchen', 'bookiflex'),
                        __('Washing Machine', 'bookiflex'),
                        __('Dishwasher', 'bookiflex'),
                        __('Smart TV', 'bookiflex'),
                        __('Air Conditioning', 'bookiflex'),
                        __('Living Room', 'bookiflex'),
                        __('Balcony', 'bookiflex'),
                    ],
                ],
                // Index 3: Three-Bedroom Apartment
//                [
//                    'name' => __('Three-Bedroom Apartment', 'bookiflex'),
//                    'mainPlaces' => 7,
//                    'unitType' => BookingUnitTypeInterface::RENTAL_UNIT,
//                    'availableUnits' => 1,
//                    'address' => '321 Madison Avenue, Suite 8A, New York, NY 10017',
//                    'description' => $apartmentDescriptions[array_rand($apartmentDescriptions)],
//                    'amenities' => [
//                        __('Wi-Fi', 'bookiflex'),
//                        __('Full Kitchen', 'bookiflex'),
//                        __('Washing Machine', 'bookiflex'),
//                        __('Dishwasher', 'bookiflex'),
//                        __('Two Bathrooms', 'bookiflex'),
//                        __('Smart TV', 'bookiflex'),
//                        __('Air Conditioning', 'bookiflex'),
//                        __('Dining Room', 'bookiflex'),
//                        __('Balcony', 'bookiflex'),
//                    ],
//                ],
                // Index 4: Penthouse Apartment
                [
                    'name' => __('Penthouse Apartment', 'bookiflex'),
                    'mainPlaces' => 4,
                    'unitType' => BookingUnitTypeInterface::RENTAL_UNIT,
                    'availableUnits' => 1,
                    'address' => '555 Fifth Avenue, Penthouse PH1, New York, NY 10036',
                    'description' => $apartmentDescriptions[array_rand($apartmentDescriptions)],
                    'amenities' => [
                        __('Wi-Fi', 'bookiflex'),
                        __('Gourmet Kitchen', 'bookiflex'),
                        __('Washing Machine & Dryer', 'bookiflex'),
                        __('Dishwasher', 'bookiflex'),
                        __('Multiple Smart TVs', 'bookiflex'),
                        __('Air Conditioning', 'bookiflex'),
                        __('Luxury Furnishings', 'bookiflex'),
                        __('Rooftop Terrace', 'bookiflex'),
                        __('City Views', 'bookiflex'),
                        __('Premium Appliances', 'bookiflex'),
                    ],
                ],
            ],

            // Rate Plans with pricing configuration
            'ratePlans' => [
                // Rate Plan 1: Prepaid Saver Rate
                [
                    'title' => __('Prepaid Saver Rate', 'bookiflex'),
                    'shortCode' => 'PREPAID',
                    'boardType' => BoardType::ROOM_ONLY,
                    'accommodationIndices' => [0, 1, 2],  // All apartments
                    'paymentTypeKeys' => ['pay_online_full'],
                    'cancellationPolicyKey' => 'non_refundable',
                    'weeklyPricing' => [
                        // Index 0: Studio Apartment (20% discount)
                        0 => [
                            'mon' => 8000,
                            'tue' => 8000,
                            'wed' => 8000,
                            'thu' => 8000,
                            'fri' => 10400,
                            'sat' => 10400,
                            'sun' => 10400,
                        ],
                        // Index 1: Two-Bedroom Apartment (20% discount)
                        1 => [
                            'mon' => 16000,
                            'tue' => 16000,
                            'wed' => 16000,
                            'thu' => 16000,
                            'fri' => 20800,
                            'sat' => 20800,
                            'sun' => 20800,
                        ],
                        // Index 2: Penthouse (20% discount)
                        2 => [
                            'mon' => 32000,
                            'tue' => 32000,
                            'wed' => 32000,
                            'thu' => 32000,
                            'fri' => 41600,
                            'sat' => 41600,
                            'sun' => 41600,
                        ],
                    ],
                ],
                // Rate Plan 2: Flexible Pay on Arrival
                [
                    'title' => __('Flexible Pay on Arrival', 'bookiflex'),
                    'shortCode' => 'FLEX',
                    'boardType' => BoardType::ROOM_ONLY,
                    'accommodationIndices' => [0, 1, 2],  // All apartments
                    'paymentTypeKeys' => ['pay_on_arrival'],
                    'cancellationPolicyKey' => 'fully_flexible',
                    'weeklyPricing' => [
                        // Index 0: Studio Apartment (standard rate)
                        0 => [
                            'mon' => 10000,
                            'tue' => 10000,
                            'wed' => 10000,
                            'thu' => 10000,
                            'fri' => 13000,
                            'sat' => 13000,
                            'sun' => 13000,
                        ],
                        // Index 1: Two-Bedroom Apartment (standard rate)
                        1 => [
                            'mon' => 20000,
                            'tue' => 20000,
                            'wed' => 20000,
                            'thu' => 20000,
                            'fri' => 26000,
                            'sat' => 26000,
                            'sun' => 26000,
                        ],
                        // Index 2: Penthouse (standard rate)
                        2 => [
                            'mon' => 40000,
                            'tue' => 40000,
                            'wed' => 40000,
                            'thu' => 40000,
                            'fri' => 52000,
                            'sat' => 52000,
                            'sun' => 52000,
                        ],
                    ],
                ],
            ],
        ];
    }

    /**
     * Get universal descriptions by unit type
     *
     * Returns 2-3 generic descriptions suitable for any accommodation of the given type.
     * Each description is 200-300 characters and designed to be universally applicable.
     *
     * @param  string $unitType Unit type (room, bed, unit)
     * @return array Array of description strings
     */
    public function getDescriptionsByUnitType(string $unitType): array
    {
        $descriptions = [
	        BookingUnitTypeInterface::RENTAL_UNIT         => [
                __('Modern apartment offering a complete home-away-from-home experience in a prime location. Features a fully equipped kitchen, comfortable living space, and all essential amenities for independent living. Perfect for travelers seeking flexibility, comfort, and the freedom to live at their own pace.', 'bookiflex'),
                __('Stylish apartment designed for comfortable independent stays. Complete with modern kitchen facilities, quality furnishings, and thoughtful amenities, this space provides everything needed for relaxing vacation or extended business trips. Enjoy the convenience of home combined with the service of professional hospitality.', 'bookiflex'),
                __('Well-appointed apartment combining residential comfort with vacation convenience. Featuring contemporary design, full home amenities, and practical living spaces, this accommodation offers guests the independence and flexibility of apartment living with the reliability of professional property management.', 'bookiflex'),
            ],
        ];

        return $descriptions[$unitType] ?? [];
    }

    /**
     * Get amenities by unit type
     *
     * Returns a list of approximately 7 typical amenities for the given accommodation type.
     *
     * @param  string $unitType Unit type (room, bed, unit)
     * @return array Array of amenity strings
     */
    public function getAmenitiesByUnitType(string $unitType): array
    {
        $amenities = [
	        BookingUnitTypeInterface::RENTAL_UNIT         => [
                __('Full Kitchen', 'bookiflex'),
                __('Washing Machine', 'bookiflex'),
                __('Living Room', 'bookiflex'),
                __('Dining Area', 'bookiflex'),
                __('Cooking Utensils', 'bookiflex'),
                __('Refrigerator', 'bookiflex'),
                __('Coffee Maker', 'bookiflex'),
            ],
        ];

        return $amenities[$unitType] ?? [];
    }

    /**
     * Get universal descriptions by board type
     *
     * Returns 3 generic descriptions suitable for rate plans with different board types.
     * Each description is approximately 200-270 characters.
     *
     * @param  string $boardType Board type (ROOM_ONLY, BED_AND_BREAKFAST, etc.)
     * @return array Array of description strings
     */
    public function getDescriptionsByBoardType(string $boardType): array
    {
        $descriptions = [
            BoardType::ROOM_ONLY->value => [
                __('Standard accommodation rate providing comfortable lodging without additional services. This flexible option offers excellent value for independent travelers who prefer to explore local dining and arrange their own activities during their stay.', 'bookiflex'),
                __('Room-only rate offering quality accommodation at competitive pricing. Perfect for guests seeking freedom and flexibility to customize their stay, with full access to all property facilities and amenities during their visit.', 'bookiflex'),
                __('Basic accommodation rate focused on comfortable lodging essentials. Ideal for travelers who value independence, allowing guests to enjoy the accommodation while maintaining complete control over their dining and activity preferences.', 'bookiflex'),
            ],
        ];

        return $descriptions[$boardType] ?? [];
    }

    /**
     * {@inheritDoc}
     */
    public function getBookingPresets(): array
    {
        return [
            [
                'id' => 'flexible_pay_on_arrival',
                'cancellationPolicyKey' => 'fully_flexible',
                'paymentTypeKey' => 'pay_on_arrival',
                'title' => __('Flexible – Pay on Arrival', 'bookiflex'),
                'shortDescription' => __('Guests can cancel anytime for free. No prepayment is required. The full amount is paid at check-in.', 'bookiflex'),
                'recommendation' => __('Best for new hosts or low-demand periods. Increases booking conversion and feels safest for guests, but offers no protection against last-minute cancellations.', 'bookiflex'),
                'popular' => false,
            ],
            [
                'id' => 'moderate_prepayment_20',
                'cancellationPolicyKey' => 'strict_72h_20',
                'paymentTypeKey' => 'prepayment_card_20',
                'title' => __('Moderate – 20% Prepayment', 'bookiflex'),
                'shortDescription' => __('20% is charged at booking. Free cancellation up to 72 hours before check-in. Late cancellations forfeit the 20% prepayment.', 'bookiflex'),
                'recommendation' => __('Most balanced option for small property owners. Reduces fake bookings while remaining attractive to guests. The penalty matches the prepayment amount, making it fair and enforceable.', 'bookiflex'),
                'popular' => true,
            ],
            [
                'id' => 'strict_prepayment_50',
                'cancellationPolicyKey' => 'strict_72h_50',
                'paymentTypeKey' => 'prepayment_card_50',
                'title' => __('Strict – 50% Prepayment', 'bookiflex'),
                'shortDescription' => __('50% is charged at booking. Free cancellation up to 72 hours before check-in. Late cancellations forfeit the 50% prepayment.', 'bookiflex'),
                'recommendation' => __('Good for high-demand dates or seasonal properties. Provides strong income protection with a penalty that matches the prepayment amount.', 'bookiflex'),
                'popular' => false,
            ],
            [
                'id' => 'non_refundable_pay_online',
                'cancellationPolicyKey' => 'non_refundable',
                'paymentTypeKey' => 'pay_online_full',
                'title' => __('Non-refundable – Pay Online', 'bookiflex'),
                'shortDescription' => __('100% of the booking amount is charged at the time of booking. No refunds for cancellations.', 'bookiflex'),
                'recommendation' => __('Ideal for discounted or promotional rates. Ensures guaranteed income but offers no flexibility to guests.', 'bookiflex'),
                'popular' => false,
            ],
        ];
    }

    /**
     * {@inheritDoc}
     */
    public function getAccommodationTypes(): array
    {
        return [
            [
                'value' => BookingUnitTypeInterface::RENTAL_UNIT,
                'label' => __('Rental unit', 'bookiflex'),
            ],
        ];
    }
}