#!/usr/bin/env python3
"""Test all activity builders."""

from activity_builders import *

print('Testing all builders...\n')

# Phase 1
print('PHASE 1: Addition & Subtraction')
print('  build_number_bonds:', len(build_number_bonds({'whole': 10, 'pairs': [(3, 7), (4, None)], 'note': 'Test'})))
print('  build_fact_families:', len(build_fact_families({'families': [[3, 7, 10]], 'note': 'Test'})))
print('  build_make_10_strategy:', len(build_make_10_strategy({'problems': [(8, 5)], 'note': 'Test'})))
print('  build_pairs_to_make:', len(build_pairs_to_make({'target': 10, 'pairs': [(3, 7), (None, 6)], 'note': 'Test'})))
print('  build_missing_addend:', len(build_missing_addend({'problems': [(3, 10), (7, 10)], 'note': 'Test'})))

# Phase 2
print('\nPHASE 2: Column Math')
print('  build_column_addition:', len(build_column_addition({'problems': [(23, 45)], 'note': 'Test'})))
print('  build_column_subtraction:', len(build_column_subtraction({'problems': [(56, 23)], 'note': 'Test'})))
print('  build_regrouping_visual:', len(build_regrouping_visual({'problems': [(28, 34, 'add')], 'note': 'Test'})))
print('  build_two_step_problems:', len(build_two_step_problems({'problems': [{'text': 'Test problem', 'blanks': 2}], 'note': 'Test'})))

# Phase 3
print('\nPHASE 3: Measurement, Time & Money')
print('  build_ruler_measurement:', len(build_ruler_measurement({'lines': [{'length_px': 100, 'label': 'A'}], 'unit': 'inches', 'note': 'Test'})))
print('  build_clock_telling:', len(build_clock_telling({'times': [{'hour': 3, 'minute': 0, 'blank': True}], 'note': 'Test'})))
print('  build_coin_identification:', len(build_coin_identification({'coins': [{'type': 'penny', 'count': 1, 'blank_value': True}], 'note': 'Test'})))
print('  build_money_adding:', len(build_money_adding({'problems': [{'coins': [{'type': 'quarter', 'count': 1}, {'type': 'dime', 'count': 2}]}], 'note': 'Test'})))

# Phase 4
print('\nPHASE 4: Geometry & Data')
print('  build_picture_graph:', len(build_picture_graph({'categories': [{'name': 'Apples', 'count': 5, 'blank': True}], 'key_value': 1, 'note': 'Test'})))
print('  build_bar_graph:', len(build_bar_graph({'entries': [{'label': 'A', 'value': 5, 'blank': False}], 'max_value': 10, 'note': 'Test'})))
print('  build_shape_attributes:', len(build_shape_attributes({'shapes': [{'name': 'Triangle', 'sides': 3, 'vertices': 3, 'blanks': ['sides']}], 'note': 'Test'})))
print('  build_symmetry:', len(build_symmetry({'shapes': [{'name': 'Square', 'lines': 4}], 'note': 'Test'})))
print('  build_area_perimeter:', len(build_area_perimeter({'shapes': [{'rows': 2, 'cols': 3, 'blank_area': True, 'blank_perimeter': True}], 'note': 'Test'})))
print('  build_fraction_circle:', len(build_fraction_circle({'fractions': [{'numerator': 1, 'denominator': 2, 'blank': True}], 'note': 'Test'})))

# Phase 5
print('\nPHASE 5: Multiplication')
print('  build_equal_groups:', len(build_equal_groups({'groups': [{'num_groups': 3, 'items_per_group': 4, 'blank_total': True}], 'note': 'Test'})))
print('  build_skip_counting:', len(build_skip_counting({'sequences': [{'start': 0, 'step': 5, 'count': 6, 'blank_indices': [2, 4]}], 'note': 'Test'})))
print('  build_times_table:', len(build_times_table({'factor': 5, 'blanks': [3, 6]})))

# Celebration
print('\nCELEBRATION')
print('  build_scavenger_hunt:', len(build_scavenger_hunt({'clues': [{'question': 'What is 5+5?', 'hint': 'Count on fingers'}], 'note': 'Test'})))
print('  build_certificate:', len(build_certificate({'title': 'Math Master', 'achievement': 'completed 2nd grade'})))

print('\n✓ All 22 builders working correctly!')