<NavigationViewItem
    x:Class="Wallet.Avalonia.CategoryNavigationView"
    xmlns="https://github.com/avaloniaui"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:vm="using:Wallet"
    x:DataType="vm:CategoryNavigationViewModel"
    Content="{Binding Value}"
    IsSelected="{Binding IsSelected}">
    <Interaction.Behaviors>
        <DataTriggerBehavior Binding="{Binding IsSelected}" Value="True">
            <ConditionAction>
                <ConditionAction.Condition>
                    <ConditionalExpression ForwardChaining="And">
                        <ComparisonCondition LeftOperand="{Binding IsActivated}" RightOperand="False" />
                    </ConditionalExpression>
                </ConditionAction.Condition>
                <NavigateAction Region="Main" Route="Wallet">
                    <Parameter Key="Filter" Value="{Binding Value}" />
                </NavigateAction>
            </ConditionAction>
            <ConditionAction>
                <ConditionAction.Condition>
                    <ConditionalExpression ForwardChaining="And">
                        <ComparisonCondition LeftOperand="{Binding IsActivated}" RightOperand="True" />
                    </ConditionalExpression>
                </ConditionAction.Condition>
                <NavigateAction Region="Left" Route="ItemCollection">
                    <Parameter Key="Filter" Value="{Binding Value}" />
                    <Parameter Key="Transition" Value="Suppress" />
                    <Parameter Key="IsBackStackEnabled" Value="{x:True}" />
                    <Parameter Key="ClearBackStack" Value="{x:True}" />
                </NavigateAction>
            </ConditionAction>
        </DataTriggerBehavior>
    </Interaction.Behaviors>
    <NavigationViewItem.InfoBadge>
        <InfoBadge Value="{Binding Key}" />
    </NavigationViewItem.InfoBadge>
</NavigationViewItem>
