"""
Configuration metadata for the B2B SaaS waterfall blueprint.
"""

WATERFALL_BLUEPRINT = {
    "id": "waterfall_v1",
    "name": "Sales & Marketing Waterfall",
    "description": "Target-driven pipeline and capacity model for B2B SaaS.",
    "tabs": ["FY26_Assumptions", "FY27_Assumptions", "Waterfall"],
    "wizard_inputs": [
        {"key": "fy_start_month", "label": "Fiscal year start month", "type": "select", "options": list(range(1, 13)), "default": 1},
        {"key": "annual_target", "label": "Annual NB Revenue Target", "type": "currency", "required": True},
        {"key": "nl_attribution", "label": "% Attribution New Logo", "type": "percent", "default": 0.925},
        {"key": "upsell_attribution", "label": "% Attribution Upsell", "type": "percent", "default": 0.075},
        {"key": "multiplier", "label": "Multiplier on Bookings", "type": "number", "default": 1.2},
        {"key": "disco_to_pipe_rate", "label": "Disco to Pipe Rate", "type": "percent", "default": 0.4},
        {"key": "nl_win_rate", "label": "New Logo Win Rate", "type": "percent", "default": 0.25},
        {"key": "nl_asp", "label": "New Logo ASP", "type": "currency", "default": 175000},
        {"key": "nl_lag", "label": "New Logo Lag (quarters)", "type": "int", "default": 2},
        {"key": "upsell_win_rate", "label": "Upsell Win Rate", "type": "percent", "default": 0.50},
        {"key": "upsell_asp", "label": "Upsell ASP", "type": "currency", "default": 43750},
        {"key": "upsell_lag", "label": "Upsell Lag (quarters)", "type": "int", "default": 1},
        {"key": "sdr_productivity", "label": "SDR Productivity (calls/month)", "type": "int", "default": 10},
        {"key": "ae_productivity", "label": "AE Productivity ($/qtr)", "type": "currency", "default": 250000},
        {"key": "ae_to_se_ratio", "label": "AE to SE Ratio", "type": "number", "default": 2.5},
        {"key": "poc_rate", "label": "PoC Rate", "type": "percent", "default": 0.8},
    ],
    "quarterly_pacing": {
        "default": [0.15, 0.20, 0.30, 0.35],
        "label": "Quarterly Pacing (Q1-Q4)",
    },
    "validation_rules": [
        {"name": "target_equals_realized", "check": "Total Target == Total Bookings Realized", "tolerance": 1},
        {"name": "sdr_capacity_sufficient", "check": "SDR Capacity >= Total Disco Calls"},
        {"name": "ae_capacity_sufficient", "check": "AE Capacity >= Total Target"},
        {"name": "pacing_sums_to_one", "check": "SUM(pacing) == 1.0"},
    ],
}

__all__ = ["WATERFALL_BLUEPRINT"]
