<!-- Add/Update Subscription Form -->
<div class="form-container">
    <h2 style="margin-bottom: 20px; color: #333;">➕ Tambah/Update Subscription</h2>
    <form method="POST" id="subscriptionForm" action="<?php echo e(route('admin.panel.post')); ?>">
        <?php echo csrf_field(); ?>
        <input type="hidden" name="action" value="create_update">
        <input type="hidden" name="is_update" id="is_update" value="0">

        <div class="form-grid">
            <div class="form-group">
                <label for="subscription_id">Subscription ID:</label>
                <input type="text" id="subscription_id" name="subscription_id" required
                    placeholder="Misal: A1B2C3D4E5F6" maxlength="20">
            </div>

            <div class="form-group">
                <label for="duration_days">Durasi (hari):</label>
                <select id="duration_days" name="duration_days">
                    <option value="0">Tidak mengubah durasi</option>
                    <option value="1">1 hari (Trial)</option>
                    <option value="7">7 hari</option>
                    <option value="30" selected>30 hari</option>
                    <option value="90">90 hari</option>
                    <option value="365">365 hari</option>
                </select>
            </div>

            <div class="form-group">
                <label for="active">Status:</label>
                <select id="active" name="active">
                    <option value="1" selected>✅ Aktif</option>
                    <option value="0">❌ Nonaktif</option>
                </select>
            </div>

            <div class="form-group">
                <label for="custom_expiry">Custom Expiry Date (opsional):</label>
                <input type="datetime-local" id="custom_expiry" name="custom_expiry">
            </div>
        </div>

        <div class="form-group">
            <label for="note">Catatan (opsional):</label>
            <textarea id="note" name="note" rows="2" placeholder="Catatan untuk subscription ini..."></textarea>
        </div>

        <div style="display: flex; gap: 10px; flex-wrap: wrap;">
            <button type="submit" class="btn" id="submitBtn">💾 Simpan Subscription</button>
            <button type="button" class="btn btn-warning" onclick="resetForm()">🔄 Reset Form</button>
        </div>
    </form>
</div>
<?php /**PATH /home/codexgen.my.id/laravel/resources/views/admin/partials/subscription-form.blade.php ENDPATH**/ ?>