import dash_bootstrap_components as dbc
import dash_html_components as html

DBC_DOCS = (
    "https://dash-bootstrap-components.opensource.faculty.ai/docs/components/"
)


def make_subheading(label, link):
    slug = label.replace(" ", "")

    heading = html.H2(
        html.Span(
            [
                label,
                html.A(
                    html.I(className="fas fa-book fa-xs ml-2"),
                    href=f"{DBC_DOCS}{link}",
                    target="_blank",
                    id=f"tooltip_target_{slug}",
                ),
            ],
        ),
    )

    return html.Div(
        [
            heading,
            dbc.Tooltip(
                f"See {label} documentation", target=f"tooltip_target_{slug}"
            ),
        ],
        className="mt-3",
    )

[((657, 731), 'dash_bootstrap_components.Tooltip', 'dbc.Tooltip', (['f"""See {label} documentation"""'], {'target': 'f"""tooltip_target_{slug}"""'}), "(f'See {label} documentation', target=f'tooltip_target_{slug}')\n", (668, 731), True, 'import dash_bootstrap_components as dbc\n'), ((365, 407), 'dash_html_components.I', 'html.I', ([], {'className': '"""fas fa-book fa-xs ml-2"""'}), "(className='fas fa-book fa-xs ml-2')\n", (371, 407), True, 'import dash_html_components as html\n')]