<UserControl x:Class="FasdDesktopUi.Basics.UserControls.SearchResult.SearchResultCategory"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:local="clr-namespace:FasdDesktopUi.Basics.UserControls.SearchResult"
             xmlns:uc="clr-namespace:FasdDesktopUi.Basics.UserControls"
             xmlns:ico="clr-namespace:FasdDesktopUi.Basics.UserControls.AdaptableIcon;assembly=F4SD-AdaptableIcon"
             mc:Ignorable="d"
             d:DesignHeight="80"
             d:DesignWidth="450"
             x:Name="SearchResultCategoryUc">

    <UserControl.Resources>
        <BooleanToVisibilityConverter x:Key="BoolToVisibility" />
    </UserControl.Resources>

    <StackPanel>

        <Border Background="{DynamicResource BackgroundColor.Menu.SubCategory}"
                CornerRadius="7.5"
                Visibility="{Binding ElementName=SearchResultCategoryUc, Path=IsPending, Converter={StaticResource BoolToVisibility}}">

            <DockPanel>
                <ico:AdaptableIcon SelectedInternIcon="{Binding ElementName=SearchResultCategoryUc, Path=TitleIcon.Intern}"
                                   SelectedMaterialIcon="{Binding ElementName=SearchResultCategoryUc, Path=TitleIcon.Material}"
                                   Style="{DynamicResource Menu.CategoryBase.Icon.NoHover}"
                                   IconHeight="22.5"
                                   IconWidth="22.5"
                                   Margin="10 2.5"
                                   DockPanel.Dock="Left" />

                <ico:AdaptableIcon SelectedInternGif="loadingPoints"
                                   IconHeight="40"
                                   IconWidth="40"
                                   Margin="10 2.5"
                                   DockPanel.Dock="Right" />

                <TextBlock Text="{Binding ElementName=SearchResultCategoryUc, Path=Title}"
                           Style="{DynamicResource Menu.CategoryBase.TextBlock.NoHover}"
                           DockPanel.Dock="Left" />
            </DockPanel>
        </Border>

        <uc:CustomMenu x:Name="ResultMenu"
                       x:FieldModifier="private" />
    </StackPanel>
</UserControl>
