Learn from Licensed Therapist Alexa Martinez NCLMBT #10918. Master hands-on techniques, prepare for NC licensing, and earn approved NCBTMB continuing education credits.
.
π‘οΈ Deposit Policy: The $${depositAmount.toFixed(0)} seat deposit is non-refundable, but 100% transferable to any other class or workshop if you need to cancel or reschedule.
`;
modal.style.display = 'flex';
if (window.lucide) lucide.createIcons();
}
function handlePaymentOptionChange(radio, totalPrice) {
const val = radio.value;
const depositCard = document.getElementById('labelOptionDeposit');
const fullCard = document.getElementById('labelOptionFull');
const personCard = document.getElementById('labelOptionPerson');
const submitBtn = document.getElementById('enrollSubmitBtn');
[depositCard, fullCard, personCard].forEach(c => {
if (c) {
c.style.border = '1px solid var(--border)';
c.style.background = '#fff';
}
});
if (val === 'deposit') {
if (depositCard) {
depositCard.style.border = '2px solid var(--accent)';
depositCard.style.background = 'rgba(197,160,89,0.08)';
}
if (submitBtn) {
submitBtn.innerHTML = ` Complete Registration (.00 Deposit)`;
}
} else if (val === 'full') {
if (fullCard) {
fullCard.style.border = '2px solid #10B981';
fullCard.style.background = 'rgba(16,185,129,0.06)';
}
if (submitBtn) {
submitBtn.innerHTML = ` Complete Registration ($${totalPrice.toFixed(2)} Full Tuition)`;
}
} else {
if (personCard) {
personCard.style.border = '2px solid #0284c7';
personCard.style.background = 'rgba(56,189,248,0.08)';
}
if (submitBtn) {
submitBtn.innerHTML = ` Reserve Seat & Pay at Studio`;
}
}
if (window.lucide) lucide.createIcons();
}
async function submitEnrollment(form, clsId, title, price, dates = '') {
const name = form.querySelector('[name="studentName"]').value.trim();
const email = form.querySelector('[name="studentEmail"]').value.trim();
const phone = form.querySelector('[name="studentPhone"]')?.value.trim() || '';
const license = form.querySelector('[name="studentLicense"]')?.value.trim() || 'Student / Aspiring LMBT';
const option = form.querySelector('[name="paymentOption"]:checked')?.value || 'deposit';
const submitBtn = document.getElementById('enrollSubmitBtn');
if (submitBtn) {
submitBtn.disabled = true;
submitBtn.innerHTML = 'β³ Registering Student...';
}
let regCode = 'REG-' + Math.floor(100000 + Math.random() * 900000);
try {
const res = await fetch('api?action=enroll_class', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
classId: clsId,
classTitle: title,
classDate: dates,
studentName: name,
studentEmail: email,
studentPhone: phone,
licenseNumber: license,
paymentOption: option,
tuitionPrice: price
})
});
const data = await res.json();
if (data && data.success && data.registration) {
regCode = data.registration.registration_code || regCode;
if (window.AmoClassesCMS && Array.isArray(AmoClassesCMS.classes)) {
const cls = AmoClassesCMS.classes.find(c => c.id === clsId || String(c.db_id) === String(clsId));
if (cls) {
cls.enrolled = (parseInt(cls.enrolled) || 0) + 1;
localStorage.setItem('amo_classes_data', JSON.stringify(AmoClassesCMS.classes));
}
}
if (typeof renderPublicClasses === 'function') renderPublicClasses();
if (typeof renderClassDetailView === 'function') renderClassDetailView();
} else if (data && data.error) {
if (window.AmoToast) AmoToast.show(data.error, 'error', 6000);
if (submitBtn) submitBtn.disabled = false;
return;
}
} catch (err) {
console.error('Class enrollment error:', err);
}
const modal = document.getElementById('studentEnrollModal');
if (modal) modal.style.display = 'none';
if (option === 'deposit') {
const remaining = Math.max(0, price - 50.00);
if (window.AmoToast) {
AmoToast.show(`π Spot Secured (${regCode})! ${name} is registered for '${title}' with a seat deposit. Remaining balance ($${remaining.toFixed(2)}) due before class day. Alexa's class roster has been updated!`, 'success', 8000);
} else {
alert(`π Spot Secured (${regCode})! ${name} is registered for '${title}'.`);
}
} else if (option === 'full') {
if (window.AmoToast) {
AmoToast.show(`π Full Enrollment Confirmed (${regCode})! ${name} is registered & paid in full ($${price.toFixed(2)}) for '${title}'. Alexa's class roster has been updated!`, 'success', 7000);
} else {
alert(`π Full Enrollment Confirmed (${regCode})! ${name} is registered for '${title}'.`);
}
} else {
if (window.AmoToast) {
AmoToast.show(`π Seat Reserved (${regCode})! ${name} is on Alexa's student roster for '${title}'. Tuition ($${price.toFixed(2)}) due in person at the studio.`, 'success', 7000);
} else {
alert(`π Seat Reserved (${regCode})! ${name} is registered for '${title}'.`);
}
}
}