<?php
/**
 * VENDOR REJECTION EMAIL TEMPLATE
 * File: templates/email/vendor-rejected.php
 * Vendor account rejection notification
 * 
 * Available variables: $business_name, $email, $reason, $app_name, $app_url
 */

// Email content
ob_start();
?>

<p>Thank you for your interest in becoming a vendor on <?= $app_name ?>.</p>

<div class="alert alert-warning">
    <strong>Application Status:</strong> Unfortunately, your vendor account application has not been approved at this time.
</div>

<div class="order-summary">
    <h3>Rejection Reason</h3>
    <div style="background: #f8d7da; padding: 15px; border-radius: 5px; border-left: 4px solid #05472A; color: #721c24;">
        <?= nl2br(htmlspecialchars($reason ?? 'No specific reason provided.')) ?>
    </div>
</div>

<div class="alert alert-info">
    <strong>What You Can Do:</strong>
    <ul style="margin: 10px 0 0 20px;">
        <li><strong>Review the Requirements:</strong> Make sure you meet all vendor eligibility criteria</li>
        <li><strong>Address the Issues:</strong> If specific issues were mentioned, work on resolving them</li>
        <li><strong>Reapply:</strong> You can submit a new application after addressing the concerns</li>
        <li><strong>Contact Support:</strong> If you have questions or believe this is a mistake, reach out to our team</li>
    </ul>
</div>

<div class="order-summary">
    <h3>Common Reasons for Rejection</h3>
    <ul>
        <li>Incomplete business information</li>
        <li>Unable to verify business legitimacy</li>
        <li>Items don't meet platform guidelines</li>
        <li>Duplicate account detected</li>
        <li>Previous policy violations</li>
    </ul>
</div>

<p>If you believe this decision was made in error or would like more information about your application status, please contact our vendor support team. We're here to help!</p>

<div class="alert alert-success">
    <strong>Still Want to Rent?</strong> While your vendor application wasn't approved, you can still use <?= $app_name ?> as a customer to rent items from our approved vendors.
</div>

<?php
$content = ob_get_clean();

// Prepare email data
$email_data = [
    'title' => 'Vendor Application Status',
    'greeting' => "Hello " . $business_name . "!",
    'content' => $content,
    'action_url' => $app_url . '/public/contact.php',
    'action_text' => 'Contact Support',
    'secondary_action_url' => $app_url . '/customer/browse.php',
    'secondary_action_text' => 'Browse Items',
    'footer_note' => 'We appreciate your interest in partnering with us.',
    'signature' => "Best regards,<br>The " . $app_name . " Team<br>vendors@moyalony.com"
];

// Include layout
include 'layout.php';
?>