<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:noesis="clr-namespace:NoesisGUIExtensions;assembly=Noesis.GUI.Extensions"
    xmlns:sys="clr-namespace:System;assembly=mscorlib">

    <!-- SLOT STYLES -->
    <Style x:Key="SlotLayoutStyle" TargetType="{x:Type Grid}">
        <Setter Property="Width" Value="76"/>
        <Setter Property="Height" Value="76"/>
        <Setter Property="Opacity" Value="1"/>
    </Style>

    <Style x:Key="SlotHighlightStyle" TargetType="{x:Type Border}">
        <Setter Property="Padding" Value="2"/>
        <Setter Property="Visibility" Value="Hidden"/>

        <!-- This triggers the visibility of the SlotHighlightStyle when the slot is the new stack target when manually splitting a stack -->
        <Style.Triggers>
            <DataTrigger Binding="{Binding IsManualSplitTarget}" Value="True">
                <Setter Property="Visibility" Value="Visible"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="SlotHoveredStyle" TargetType="{x:Type Border}">
        <Setter Property="BorderThickness" Value="2"/>
        <Setter Property="BorderBrush" Value="{DynamicResource Color.BorderSlotHovered}"/>
        <Setter Property="Border.Effect" Value="{DynamicResource Glow.ItemSlotHover}"/>
    </Style>

    <Style x:Key="SlotBaseStyle" TargetType="{x:Type Border}">
        <Setter Property="Background" Value="{DynamicResource Color.BackgroundSlot}"/>
        <Setter Property="HorizontalAlignment" Value="Center"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="Width" Value="72"/>
        <Setter Property="Height" Value="72"/>
        <Setter Property="Padding" Value="2"/>
    </Style>

    <Style x:Key="SlotBorderStyle" TargetType="{x:Type Border}">
        <Setter Property="BorderThickness" Value="2"/>
        <Setter Property="BorderBrush" Value="{DynamicResource Color.BorderSlot}"/>
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
        <Setter Property="VerticalAlignment" Value="Stretch"/>
    </Style>

    <Style x:Key="SlotSelectedStyle" TargetType="{x:Type Border}">
        <Setter Property="Background" Value="{DynamicResource Color.BackgroundSlotSelected}"/>
        <Setter Property="BorderThickness" Value="2"/>
        <Setter Property="BorderBrush" Value="{DynamicResource Color.BorderSlotSelected}"/>
    </Style>

    <Style x:Key="SlotItemIconStyle" TargetType="{x:Type Image}">
        <Setter Property="Width" Value="56"/>
        <Setter Property="Height" Value="56"/>
        <Setter Property="Stretch" Value="Uniform"/>
        <Setter Property="HorizontalAlignment" Value="Center"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
    </Style>

    <Style x:Key="SlotItemAmountStyle" TargetType="{x:Type TextBlock}">
        <Setter Property="FontFamily" Value="{DynamicResource Font.CoreSans}" />
        <Setter Property="FontSize" Value="{DynamicResource Font.Size.Default}"/>
        <Setter Property="TextAlignment" Value="Right"/>
        <Setter Property="Foreground" Value="{DynamicResource Color.Text}"/>
        <Setter Property="Margin" Value="0,2,4,0"/>
        <Setter Property="HorizontalAlignment" Value="Right"/>
        <Setter Property="VerticalAlignment" Value="Bottom"/>
    </Style>

    <Style x:Key="SlotIndexWrapperStyle" TargetType="{x:Type Border}">
        <Setter Property="Background" Value="{DynamicResource Color.BorderSlot}"/>
        <Setter Property="Width" Value="18"/>
        <Setter Property="Height" Value="18"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="VerticalAlignment" Value="Top"/>
    </Style>

    <Style x:Key="SlotItemIndex" TargetType="{x:Type TextBlock}">
        <Setter Property="FontFamily" Value="{DynamicResource Font.CoreSans}" />
        <Setter Property="FontSize" Value="{DynamicResource Font.Size.Small}"/>
        <Setter Property="TextAlignment" Value="Center"/>
        <Setter Property="Foreground" Value="{DynamicResource Color.Text}"/>
        <Setter Property="Padding" Value="0,0,2,2"/>
        <Setter Property="HorizontalAlignment" Value="Center"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
    </Style>

    <!-- GAMEPAD ITEM SLOT EXCLUSIVE STYLES -->
    <Style x:Key="SlotGamepadTargetStyle" TargetType="{x:Type Border}">
        <Setter Property="Padding" Value="2"/>
    </Style>

    <!-- CRAFTING INPUT SLOT EXCLUSIVE STYLES -->
    <Style x:Key="Style.SlotInput.Layout" TargetType="{x:Type Grid}">
        <Setter Property="Width" Value="76"/>
        <Setter Property="Height" Value="96"/>
        <Setter Property="Opacity" Value="1"/>
    </Style>

    <Style x:Key="Style.SlotInput.Base" TargetType="{x:Type Border}">
        <Setter Property="Background" Value="{DynamicResource Color.BackgroundSlot}"/>
        <Setter Property="Width" Value="72"/>
        <Setter Property="Height" Value="92"/>
        <Setter Property="Padding" Value="2"/>
        <Setter Property="HorizontalAlignment" Value="Center"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
    </Style>

    <Style x:Key="Style.SlotInput.Amount" TargetType="{x:Type TextBlock}">
        <Setter Property="FontFamily" Value="{DynamicResource Font.CoreSansBold}" />
        <Setter Property="FontSize" Value="{DynamicResource Font.Size.Small}"/>
        <Setter Property="Foreground" Value="{DynamicResource Color.Text}"/>
    </Style>
</ResourceDictionary>
