<CascadingValue Value="RouteValues">
    <MudDrawer @bind-Open="@_open" ClipMode="DrawerClipMode.Docked" Variant="DrawerVariant.Responsive" Breakpoint="Breakpoint.Md" Elevation="2">
        <AuthorizeView>
            <Authorized>
                <NavSwitch />
            </Authorized>
        </AuthorizeView>
    </MudDrawer>
</CascadingValue>

@code {
    [CascadingParameter] public IReadOnlyDictionary<string, object>? RouteValues { get; set; }

    private bool _open = true;

    public void Toggle() => _open = !_open;
}