<UserControl x:Class="Valg.EVA.Skanning.UserInterfaceElements.EmergencyMode.CurrentValuesSummaryView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:emergencyMode="clr-namespace:Valg.EVA.Skanning.UserInterfaceElements.EmergencyMode"
             mc:Ignorable="d" 
             d:DataContext="{d:DesignInstance d:Type=emergencyMode:CurrentValuesSummaryViewModel}">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0">
            <StackPanel.Resources>
                <Style TargetType="TextBlock" BasedOn="{StaticResource TextBlockNormal}" />
            </StackPanel.Resources>
            <TextBlock Text="{Binding Title}" Style="{StaticResource TextBlockMediumHeader}"  Margin="0,0,0,20" />

            <TextBlock Text="{Binding ElectionEventText}" Margin="0,0,0,10" />

            <TextBlock Text="{Binding CountingAsText}" Margin="0,0,0,10" />

            <StackPanel Visibility="{Binding IsMunicipalityVisible, Converter={StaticResource BooleanToVisibilityConverter}}" Margin="0,0,0,10">
                <TextBlock Text="{Binding LanguageString.EmergencyMode_CurrentValuesSummaryView_SelectedMunicipality_Text}" />
                <ItemsControl ItemsSource="{Binding CurrentMunicipalities}">
                    <ItemsControl.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Margin="10,0,5,0" >-</TextBlock>
                                <TextBlock Text="{Binding Name}" Style="{StaticResource TextBlockNormal}"  />
                            </StackPanel>
                        </DataTemplate>
                    </ItemsControl.ItemTemplate>
                </ItemsControl>
            </StackPanel>

            <StackPanel Visibility="{Binding IsCountyVisible, Converter={StaticResource BooleanToVisibilityConverter}}" Margin="0,0,0,10" Orientation="Horizontal">
                <TextBlock Text="{Binding LanguageString.EmergencyMode_CurrentValuesSummaryView_SelectedCounty_Text}" />
                <TextBlock Text="{Binding Path=CurrentCounty.Name}" Margin="5,0,0,0" />
            </StackPanel>
        </StackPanel>
    
        <StackPanel Margin="0,0,0,50" Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Left">
            <TextBlock Style="{StaticResource TextBlockMediumHeader}" VerticalAlignment="Center" Margin="0,0,10,0" Text="{Binding YourNameLabel}" />
            <TextBox Style="{StaticResource TextBoxNormal}" Width="250" VerticalAlignment="Center" Text="{Binding NameOfOperator, UpdateSourceTrigger=PropertyChanged}" />
        </StackPanel>
    </Grid>
</UserControl>
