def create_callbacks(self) -> None:
    'Register the navigation callback.'
    outputs = [(self.id_pages_content, 'children')]
    inputs = [(self.id_url, 'pathname')]

    @self.callback(outputs, inputs, [])
    def render_page(pathname):
        try:
            return [self.nav_layouts[self.select_page_name(pathname)]]
        except Exception as err:
            return [html.Div(children=[f'''Error rendering "{pathname}":
{err}'''])]

    @self.callback([(self.id_collapse, 'is_open')], [(self.id_toggler, 'n_clicks')], [(self.id_collapse, 'is_open')])
    def toggle_navbar_collapse(n_clicks, is_open):
        return [((not is_open) if n_clicks else is_open)]
Register the navigation callback.
def create_callbacks(self) -> None:
    
    outputs = [(self.id_pages_content, 'children')]
    inputs = [(self.id_url, 'pathname')]

    @self.callback(outputs, inputs, [])
    def render_page(pathname):
        try:
            return [self.nav_layouts[self.select_page_name(pathname)]]
        except Exception as err:
            return [html.Div(children=[f'Error rendering "{pathname}":
{err}'])]

    @self.callback([(self.id_collapse, 'is_open')], [(self.id_toggler, 'n_clicks')], [(self.id_collapse, 'is_open')])
    def toggle_navbar_collapse(n_clicks, is_open):
        return [((not is_open) if n_clicks else is_open)]