<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:pins="clr-namespace:Artemis.UI.Screens.VisualScripting.Pins"
             xmlns:converters="clr-namespace:Artemis.UI.Converters"
             mc:Ignorable="d"
             d:DesignWidth="200"
             x:Class="Artemis.UI.Screens.VisualScripting.Pins.OutputPinView"
             x:DataType="pins:PinViewModel">
    <UserControl.Resources>
        <converters:ColorToSolidColorBrushConverter x:Key="ColorToSolidColorBrushConverter" />
    </UserControl.Resources>
    <UserControl.Styles>
        <StyleInclude Source="/Screens/VisualScripting/VisualScripting.axaml" />
    </UserControl.Styles>
    <StackPanel Name="PinContainer" Orientation="Horizontal" Spacing="6" HorizontalAlignment="Right" PointerReleased="PinContainer_OnPointerReleased">
        <TextBlock Name="PinName" VerticalAlignment="Center" Text="{CompiledBinding Pin.Name}" />
        <Border Name="PinPoint">
            <Border Name="VisualPinPoint" 
                    BorderBrush="{CompiledBinding PinColor, Converter={StaticResource ColorToSolidColorBrushConverter}}"
                    Background="{CompiledBinding DarkenedPinColor, Converter={StaticResource ColorToSolidColorBrushConverter}}"/>
        </Border>
    </StackPanel>
</UserControl>