<Styles xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:controls="using:PSCHelpdesk.Plugins.HetznerServer.Controls">
    <Design.PreviewWith>
        <controls:ServerDetailView />
    </Design.PreviewWith>

    <Style Selector="controls|ServerDetailView">
        <!-- Set Defaults -->
        <Setter Property="Template">
            <ControlTemplate>
                <StackPanel>
                    <TextBlock Text="{Binding SelectedServer.Name}" FontSize="24"/>
                    <TabControl>
                        <TabItem Header="Domains">
                            <StackPanel>
                                <ListBox ItemsSource="{Binding SelectedServer.Domains}" Margin="0" Padding="0">
                                    <ListBox.Styles> 
                                        <Style Selector="ListBoxItem">
                                            <Setter Property="Padding" Value="0" />
                                        </Style> 
                                    </ListBox.Styles>
                                    <ListBox.ItemTemplate>
                                        <DataTemplate>
                                            <Border Padding="1" Margin="0">
                                                <!--<TextBox Text="{Binding Name}" DoubleTapped="InputElement_OnDoubleTapped"></TextBox>-->
                                                <HyperlinkButton Content="{Binding LinkDomain}" NavigateUri="{Binding LinkDomain}"></HyperlinkButton>
                                            </Border>
                                        </DataTemplate>
                                    </ListBox.ItemTemplate>
                                </ListBox>
                            </StackPanel>
                        </TabItem>
                        <TabItem Header="Settings">
                            <StackPanel>
                                <TextBlock Text="PSC ApiKey" Margin="0 5"></TextBlock>
                                <TextBox Text="{Binding SelectedServer.PscApiKey}"></TextBox>
                                <TextBlock Text="FastBill Id" Margin="0 5"></TextBlock>
                                <TextBox Text="{Binding SelectedServer.FastBillId}"></TextBox>
                                <Button Content="Save" Command="{Binding RunTheThing}"></Button>
                            </StackPanel>
                        </TabItem>
                    </TabControl>
                </StackPanel>
            </ControlTemplate>
        </Setter>
    </Style>
</Styles>
