<?php

namespace App\Mail;

use App\Models\Association;
use App\Models\PlatformSubscription;
use App\Models\SubscriptionPlan;
use Illuminate\Mail\Mailables\Content;

class SubscriptionExpiringMail extends BaseGuildMail
{
    public function __construct(
        public Association $association,
        public SubscriptionPlan $plan,
        public PlatformSubscription $subscription,
        public int $daysRemaining,
    ) {
        $this->associationName = $association->name;
    }

    protected function getSubject(): string
    {
        return "Subscription Expiring in {$this->daysRemaining} Days — {$this->association->name}";
    }

    public function content(): Content
    {
        return new Content(
            view: 'emails.subscription.expiring',
        );
    }
}
