```javascript class CustomSolarAffiliateForm extends HTMLElement { constructor() { super(); this.currentStep = 1; this.totalSteps = 3; this.formData = { company_id: '', affiliate_type: 'REFERRAL_PARTNER', affiliate_tier: 'BRONZE', commission_rate: 5, referral_code: '', total_referrals: 0, successful_referrals: 0, total_earnings: '', pending_earnings: '', average_conversion_rate: 0, traffic_sources: [], marketing_channels: [], content_types: [], target_audience: [], marketing_materials_access: false, performance_bonus_eligible: false, custom_promo_codes: [], commission_structure: 'percentage', payment_method: '', payment_frequency: 'monthly', tax_id: '', marketing_support_level: 'basic', training_completed: false, certification_level: 0, preferred_communication: [], }; } connectedCallback() { this.attachShadow({ mode: 'open' }); this.render(); } handleInputChange(e) { const { name, value, type, checked } = e.target; if (type === 'checkbox') { this.formData[name] = checked; } else { this.formData[name] = value; } this.render(); } handleArrayChange(name, value) { const currentArray = this.formData[name]; const newArray = currentArray.includes(value) ? currentArray.filter(item => item !== value) : [...currentArray, value]; this.formData[name] = newArray; this.render(); } nextStep() { if (this.currentStep < this.totalSteps) { this.currentStep++; this.render(); } } prevStep() { if (this.currentStep > 1) { this.currentStep--; this.render(); } } renderStep1() { return `