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::new("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 = Input::new("Name").value("").on_change(|_| {});
    let _secure = SecureField::new("Pass", "", |_| {});
    let _editor = Textarea::new("Long").on_change(|_| {});
    let _picker = Picker::new(0, vec!["A".into()], |_| {});
    let _date = Calendar::new();
    let _color_picker = BifrostColorPicker::new([0.0, 0.0, 0.0, 1.0]);

    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 = BifrostTabs::new(vec!["Tab".to_string()], 0, |_| {});
    // let _sheet = Sheet::new(Text::new("Content"), true);
    let _menu = DropdownMenu::new(Text::new("Trigger"), vec![DropdownItem::new("Item", || {})]);
    let _list = VStack::new(0.0).child(Text::new("Row"));
    let _table = RunesTable::new(vec!["Cell".to_string()]);
    let _form = SettingsForm::new(Text::new("Field"));

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

#[test]
fn test_visual_snapshots() {
    // let _progress = Progress::new(0.5).max(1.0);
    let _gauge = TacticalGauge::new("Tactical", 0.5);

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