<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:converters="clr-namespace:Artemis.UI.Shared.Converters;assembly=Artemis.UI.Shared"
             xmlns:controls="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
             xmlns:behaviors="clr-namespace:Artemis.UI.Shared.Behaviors;assembly=Artemis.UI.Shared"
             xmlns:screens="clr-namespace:Artemis.VisualScripting.Nodes.Static.Screens"
             mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
             x:Class="Artemis.VisualScripting.Nodes.Static.Screens.StaticSKColorValueNodeCustomView"
             x:DataType="screens:StaticSKColorValueNodeCustomViewModel">
	<UserControl.Resources>
        <converters:SKColorToStringConverter x:Key="SKColorToStringConverter" />
        <converters:SKColorToColorConverter x:Key="SKColorToColorConverter" />
    </UserControl.Resources>
    <Grid Height="24" ColumnDefinitions="*" Width="110">
        <TextBox Classes="condensed"
                 Watermark="#00000000"
                 Padding="2 2 30 2">
            <Interaction.Behaviors>
				<behaviors:LostFocusTextBoxBindingBehavior Text="{CompiledBinding CurrentValue, Converter={StaticResource SKColorToStringConverter}}"/>
            </Interaction.Behaviors>
        </TextBox>
        <controls:ColorPickerButton Classes="contained-color-picker-button"
                                    Color="{CompiledBinding CurrentValue, Converter={StaticResource SKColorToColorConverter}}"
                                    ShowAcceptDismissButtons="False"
                                    FlyoutOpened="ColorPickerButton_OnFlyoutOpened"
                                    FlyoutClosed="ColorPickerButton_OnFlyoutClosed" />
    </Grid>
</UserControl>
