//! HTML Exporter - Interactive web-based classroom export
//!
//! Generates a self-contained HTML file with:
//! - Responsive layout
//! - Scene navigation
//! - Speaker notes toggle
//! - Table of contents
//! - Embedded CSS/JS
use crate::generation::{Classroom, GeneratedScene, SceneContent, SceneType, SceneAction};
use super::{ExportOptions, ExportResult, Exporter, sanitize_filename};
use zclaw_types::Result;
/// HTML exporter
pub struct HtmlExporter {
/// Template name (reserved for future template support)
#[allow(dead_code)] // TODO: Implement template-based HTML export
template: String,
}
impl HtmlExporter {
/// Create new HTML exporter
pub fn new() -> Self {
Self {
template: "default".to_string(),
}
}
/// Create with specific template
#[allow(dead_code)] // Reserved for future template support
pub fn with_template(template: &str) -> Self {
Self {
template: template.to_string(),
}
}
/// Generate HTML content
fn generate_html(&self, classroom: &Classroom, options: &ExportOptions) -> Result {
let mut html = String::new();
// HTML header
html.push_str(&self.generate_header(classroom, options));
// Body content
html.push_str("\n");
html.push_str(&self.generate_body_start(classroom, options));
// Title slide
if options.title_slide {
html.push_str(&self.generate_title_slide(classroom));
}
// Table of contents
if options.table_of_contents {
html.push_str(&self.generate_toc(classroom));
}
// Scenes
html.push_str("\n");
for scene in &classroom.scenes {
html.push_str(&self.generate_scene(scene, options));
}
html.push_str("\n");
// Footer
html.push_str(&self.generate_footer(classroom));
html.push_str(&self.generate_body_end());
html.push_str("\n