class CustomSolarIntegratorForm extends HTMLElement { constructor() { super(); this.currentStep = 1; this.totalSteps = 3; this.formData = { company_id: '', integrator_type: 'RESIDENTIAL_INSTALLER', certification_level: 'LEVEL_1', license_number: '', license_expiry_date: '', years_of_experience: 0, completed_projects: 0, warranty_offered: '', insurance_coverage: '', specialization: [], coverage_area: [], certifications: [], equipment_brands: [], minimum_project_size: '', maximum_project_size: '', installation_time_frame: '', warranty_period: 10, maintenance_services: false, emergency_support: false, design_services: false, project_management: false, }; } 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 `