<?php

namespace Kylin\Payment\Services;

use Kylin\Payment\Scenarios\AutomotivePayment;
use Kylin\Payment\Scenarios\CrossBorderPayment;
use Kylin\Payment\Scenarios\DonationPayment;
use Kylin\Payment\Scenarios\EducationPayment;
use Kylin\Payment\Scenarios\EntertainmentPayment;
use Kylin\Payment\Scenarios\EnterprisePayment;
use Kylin\Payment\Scenarios\FinancialPayment;
use Kylin\Payment\Scenarios\FlashSalePayment;
use Kylin\Payment\Scenarios\FoodPayment;
use Kylin\Payment\Scenarios\GovernmentPayment;
use Kylin\Payment\Scenarios\GroupPayment;
use Kylin\Payment\Scenarios\InstallmentPayment;
use Kylin\Payment\Scenarios\LogisticsPayment;
use Kylin\Payment\Scenarios\MembershipRechargePayment;
use Kylin\Payment\Scenarios\MedicalPayment;
use Kylin\Payment\Scenarios\PointsExchangePayment;
use Kylin\Payment\Scenarios\PreSalePayment;
use Kylin\Payment\Scenarios\RealEstatePayment;
use Kylin\Payment\Scenarios\SubscriptionPayment;
use Kylin\Payment\Scenarios\TourismPayment;
use Kylin\Payment\Scenarios\VirtualGoodsPayment;
use Illuminate\Contracts\Container\Container;

/**
 * 支付场景服务类
 */
class PaymentScenarioService
{
    /**
     * 构造函数
     */
    public function __construct(
        protected readonly Container $app
    ) {
    }

    /**
     * 获取分期付款实例
     */
    public function installment(string $paymentType, string $name = 'default'): InstallmentPayment
    {
        return new InstallmentPayment($paymentType, $name);
    }

    /**
     * 获取订阅支付实例
     */
    public function subscription(string $paymentType, string $name = 'default'): SubscriptionPayment
    {
        return new SubscriptionPayment($paymentType, $name);
    }

    /**
     * 获取预售支付实例
     */
    public function preSale(string $paymentType, string $name = 'default'): PreSalePayment
    {
        return new PreSalePayment($paymentType, $name);
    }

    /**
     * 获取秒杀支付实例
     */
    public function flashSale(string $paymentType, string $name = 'default'): FlashSalePayment
    {
        return new FlashSalePayment($paymentType, $name);
    }

    /**
     * 获取团购支付实例
     */
    public function group(string $paymentType, string $name = 'default'): GroupPayment
    {
        return new GroupPayment($paymentType, $name);
    }

    /**
     * 获取会员充值支付实例
     */
    public function membershipRecharge(string $paymentType, string $name = 'default'): MembershipRechargePayment
    {
        return new MembershipRechargePayment($paymentType, $name);
    }

    /**
     * 获取积分兑换支付实例
     */
    public function pointsExchange(string $paymentType, string $name = 'default'): PointsExchangePayment
    {
        return new PointsExchangePayment($paymentType, $name);
    }

    /**
     * 获取虚拟商品支付实例
     */
    public function virtualGoods(string $paymentType, string $name = 'default'): VirtualGoodsPayment
    {
        return new VirtualGoodsPayment($paymentType, $name);
    }

    /**
     * 获取跨境支付实例
     */
    public function crossBorder(string $paymentType, string $name = 'default'): CrossBorderPayment
    {
        return new CrossBorderPayment($paymentType, $name);
    }

    /**
     * 获取企业支付实例
     */
    public function enterprise(string $paymentType, string $name = 'default'): EnterprisePayment
    {
        return new EnterprisePayment($paymentType, $name);
    }

    /**
     * 获取捐赠支付实例
     */
    public function donation(string $paymentType, string $name = 'default'): DonationPayment
    {
        return new DonationPayment($paymentType, $name);
    }

    /**
     * 获取教育支付实例
     */
    public function education(string $paymentType, string $name = 'default'): EducationPayment
    {
        return new EducationPayment($paymentType, $name);
    }

    /**
     * 获取医疗支付实例
     */
    public function medical(string $paymentType, string $name = 'default'): MedicalPayment
    {
        return new MedicalPayment($paymentType, $name);
    }

    /**
     * 获取旅游支付实例
     */
    public function tourism(string $paymentType, string $name = 'default'): TourismPayment
    {
        return new TourismPayment($paymentType, $name);
    }

    /**
     * 获取房产支付实例
     */
    public function realEstate(string $paymentType, string $name = 'default'): RealEstatePayment
    {
        return new RealEstatePayment($paymentType, $name);
    }

    /**
     * 获取汽车支付实例
     */
    public function automotive(string $paymentType, string $name = 'default'): AutomotivePayment
    {
        return new AutomotivePayment($paymentType, $name);
    }

    /**
     * 获取餐饮支付实例
     */
    public function food(string $paymentType, string $name = 'default'): FoodPayment
    {
        return new FoodPayment($paymentType, $name);
    }

    /**
     * 获取物流支付实例
     */
    public function logistics(string $paymentType, string $name = 'default'): LogisticsPayment
    {
        return new LogisticsPayment($paymentType, $name);
    }

    /**
     * 获取娱乐支付实例
     */
    public function entertainment(string $paymentType, string $name = 'default'): EntertainmentPayment
    {
        return new EntertainmentPayment($paymentType, $name);
    }

    /**
     * 获取政府服务支付实例
     */
    public function government(string $paymentType, string $name = 'default'): GovernmentPayment
    {
        return new GovernmentPayment($paymentType, $name);
    }

    /**
     * 获取金融服务支付实例
     */
    public function financial(string $paymentType, string $name = 'default'): FinancialPayment
    {
        return new FinancialPayment($paymentType, $name);
    }
}
