<ContentDialog
    x:Class="Wino.Dialogs.AccountPickerDialog"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:domain="using:Wino.Core.Domain"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:shared="using:Wino.Core.Domain.Entities.Shared"
    Title="{x:Bind domain:Translator.AccountPickerDialog_Title}"
    PrimaryButtonText="{x:Bind domain:Translator.Buttons_Cancel}"
    Style="{StaticResource WinoDialogStyle}"
    mc:Ignorable="d">

    <ContentDialog.Resources>
        <x:Double x:Key="ContentDialogMinWidth">360</x:Double>
    </ContentDialog.Resources>

    <ListView
        Margin="0,8,0,0"
        IsItemClickEnabled="True"
        ItemClick="AccountClicked"
        ItemsSource="{x:Bind AvailableAccounts}"
        SelectionMode="None">
        <ListView.ItemContainerStyle>
            <Style BasedOn="{StaticResource DefaultListViewItemStyle}" TargetType="ListViewItem">
                <Setter Property="Padding" Value="12,10" />
                <Setter Property="CornerRadius" Value="4" />
                <Setter Property="Margin" Value="0,2" />
            </Style>
        </ListView.ItemContainerStyle>
        <ListView.ItemTemplate>
            <DataTemplate x:DataType="shared:MailAccount">
                <TextBlock Style="{ThemeResource BodyTextBlockStyle}" Text="{x:Bind Address}" />
            </DataTemplate>
        </ListView.ItemTemplate>
    </ListView>
</ContentDialog>
