<UserControl xmlns="https://github.com/avaloniaui"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:pages="clr-namespace:GalaxyBudsClient.Interface.ViewModels.Pages"
             xmlns:controls="clr-namespace:GalaxyBudsClient.Interface.Controls"
             xmlns:ext="clr-namespace:GalaxyBudsClient.Interface.MarkupExtensions"
             xmlns:i18N="clr-namespace:GalaxyBudsClient.Generated.I18N"
             mc:Ignorable="d" d:DesignWidth="800"
             x:Class="GalaxyBudsClient.Interface.Pages.FitTestPage"
             x:DataType="pages:FitTestPageViewModel"
             x:CompileBindings="True">

    <Design.DataContext>
        <pages:FitTestPageViewModel />
    </Design.DataContext>

    <ScrollViewer>
        <Interaction.Behaviors>
            <ext:RequiresConnectedDeviceBehavior />
        </Interaction.Behaviors>
        
        <StackPanel Spacing="8" Margin="{StaticResource AppPageMargin}">
            <Border Classes="Card" ClipToBounds="True">

                <controls:EarbudControlUnit ButtonText="{ext:Translate {x:Static i18N:Keys.MainpageFitTest}}"
                                            WarningText="{Binding WarningText}"
                                            IsChecked="{Binding IsActive}">
                    <controls:EarbudControlUnit.LeftContent>
                        <TextBlock Text="{Binding LeftStatus}"
                                   MinWidth="70"
                                   VerticalAlignment="Center"
                                   TextAlignment="Right" />
                    </controls:EarbudControlUnit.LeftContent>

                    <controls:EarbudControlUnit.RightContent>
                        <TextBlock Text="{Binding RightStatus}"
                                   MinWidth="70"
                                   VerticalAlignment="Center"
                                   TextAlignment="Left" />
                    </controls:EarbudControlUnit.RightContent>
                </controls:EarbudControlUnit>

            </Border>
        </StackPanel>
    </ScrollViewer>
</UserControl>