<?php

namespace App\Http\Controllers;

use Illuminate\Support\Facades\Auth;
use Inertia\Inertia;

class BusinessSubscriptionController extends Controller
{
    public function index()
    {
        $business = Auth::guard('business')->user();

        return Inertia::render('Business/Subscription/Index', [
            'business' => [
                'plan_type' => $business->plan_type,
                'plan_expiry_date' => $business->plan_expiry_date,
                'plan_status' => $business->plan_status,
                'is_expired' => $business->isExpired(),
            ],
        ]);
    }
}