use cvkg_components::*;

#[test]
fn test_primitive_snapshots() {
    // In Phase 3, we verify that the components construct correctly.
    // Real snapshot pixel diffing happens in Phase 8 via `insta` + wgpu rendering.
    // For now, we capture the structure or simply ensure the API is complete.
    let _text = Text::new("Snapshot");
    let _image = Image::placeholder();
    let _divider = Divider::horizontal();
    let _spacer = Spacer::new(10.0);
    let _shape = Shape::rounded_rect(5.0);
    let _color = Color::BLACK;
    
    // Validate insta dependency presence
    insta::assert_snapshot!("Primitive API", "All primitive components constructed successfully.");
}

#[test]
fn test_interactive_snapshots() {
    let _button = Button::new("Click", || {});
    let _toggle = Toggle::new("Switch", false, |_| {});
    let _slider = Slider::new(0.5, 0.0..=1.0, |_| {});
    let _stepper = Stepper::new("Step", 0, |_| {});
    let _text_field = TextField::new("Name", "", |_| {});
    let _secure = SecureField::new("Pass", "", |_| {});
    let _editor = TextEditor::new("Long", |_| {});
    let _picker = Picker::new(0, vec!["A".into()], |_| {});
    let _date = DatePicker::new(0, |_| {});
    let _color_picker = ColorPicker::new(Color::BLACK, |_| {});
    
    insta::assert_snapshot!("Interactive API", "All interactive components constructed successfully.");
}

#[test]
fn test_container_snapshots() {
    let _nav = NavigationStack::new(Text::new("Root"));
    let _split = NavigationSplitView::new(Text::new("Side"), Text::new("Detail"));
    let _tab = TabView::new(Text::new("Tab"));
    let _sheet = Sheet::new(Text::new("Content"), true);
    let _alert = Alert::new("Warning", true);
    let _confirm = ConfirmationDialog::new("Sure?", true);
    let _menu = Menu::new(Text::new("Item"));
    let _list = List::new(Text::new("Row"));
    let _table = Table::new(Text::new("Cell"));
    let _form = Form::new(Text::new("Field"));

    insta::assert_snapshot!("Container API", "All container components constructed successfully.");
}

#[test]
fn test_visual_snapshots() {
    let _progress = ProgressView::new(0.5, 1.0);
    let _gauge = Gauge::new(50.0, 0.0..=100.0);

    insta::assert_snapshot!("Visual API", "All visual components constructed successfully.");
}
