<Styles xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:avalonia="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia"
        xmlns:controls="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia">
    <!-- Preview -->
    <Design.PreviewWith>
		<Border Padding="20">
            <StackPanel>
                <TextBlock Margin="0 5 0 0">Button.icon-button</TextBlock>
                <Button Classes="icon-button">
                    <avalonia:MaterialIcon Kind="Cog" />
                </Button>
                <Button Classes="icon-button" IsEnabled="False">
                    <avalonia:MaterialIcon Kind="Cog" />
                </Button>

				<TextBlock Margin="0 5 0 0">Button.icon-button icon-button-small</TextBlock>
                <Button Classes="icon-button icon-button-small">
                    <avalonia:MaterialIcon Kind="Cog" />
                </Button>

                <TextBlock Margin="0 5 0 0">ToggleButton.icon-button</TextBlock>
                <ToggleButton Classes="icon-button">
                    <avalonia:MaterialIcon Kind="Cog" />
                </ToggleButton>

                <TextBlock Margin="0 5 0 0">HyperlinkButton.icon-button</TextBlock>
                <controls:HyperlinkButton Classes="icon-button">
                    <avalonia:MaterialIcon Kind="Web" />
                </controls:HyperlinkButton>

                <TextBlock Margin="0 5 0 0">HyperlinkButton.icon-button icon-button-small</TextBlock>
                <controls:HyperlinkButton Classes="icon-button icon-button-small">
                    <avalonia:MaterialIcon Kind="Web" />
                </controls:HyperlinkButton>


				<TextBlock Margin="0 5 0 0">Button.window-button</TextBlock>
				<Button Classes="title-bar-button">
					<avalonia:MaterialIcon Kind="WindowMinimize" />
				</Button>

                <TextBlock Margin="0 5 0 0">ToggleButton.window-button</TextBlock>
                <ToggleButton Classes="icon-button">
                    <avalonia:MaterialIcon Kind="BlockChain" />
                </ToggleButton>
                
                <Button Classes="icon-button">
                    <avalonia:MaterialIcon Kind="Cog" />
                </Button>
            </StackPanel>
        </Border>
    </Design.PreviewWith>

    <!-- Styles -->
    <Style Selector=":is(Button).icon-button">
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Padding" Value="5.5" />
    </Style>
    <Style Selector=":is(Button).icon-button:pointerover /template/ Border#BorderElement">
        <Setter Property="BorderBrush" Value="Transparent" />
    </Style> 
    <Style Selector=":is(Button).icon-button:disabled /template/ Border#BorderElement">
        <Setter Property="BorderBrush" Value="Transparent" />
    </Style>
    <Style Selector=":is(Button).icon-button[IsEnabled=False] /template/ Border#BorderElement">
        <Setter Property="BorderBrush" Value="Transparent" />
    </Style>

    <Style Selector=":is(Button).icon-button:pointerover /template/ ContentPresenter#PART_ContentPresenter">
        <Setter Property="Background" Value="{DynamicResource AppBarButtonBackgroundPointerOver}" />
        <Setter Property="TextBlock.Foreground" Value="{DynamicResource AppBarButtonForegroundPointerOver}" />
    </Style>
    <Style Selector=":is(Button).icon-button:pressed /template/ ContentPresenter#PART_ContentPresenter">
        <Setter Property="Background" Value="{DynamicResource AppBarButtonBackgroundPressed}" />
        <Setter Property="TextBlock.Foreground" Value="{DynamicResource AppBarButtonForegroundPressed}" />
    </Style>
    <Style Selector=":is(Button).icon-button:disabled /template/ ContentPresenter#PART_ContentPresenter">
        <Setter Property="Background" Value="{DynamicResource AppBarButtonBackgroundDisabled}" />
        <Setter Property="TextBlock.Foreground" Value="{DynamicResource AppBarButtonForegroundDisabled}" />
    </Style>

	<Style Selector=":is(Button).icon-button-small">
        <Setter Property="Padding" Value="4" />
    </Style>
    <Style Selector=":is(Button).icon-button-small avalonia|MaterialIcon">
        <Setter Property="Width" Value="14" />
        <Setter Property="Height" Value="14" />
    </Style>

    <Style Selector=":is(Button).icon-button-large avalonia|MaterialIcon">
        <Setter Property="Width" Value="20" />
        <Setter Property="Height" Value="20" />
    </Style>

    <Style Selector="controls|HyperlinkButton.icon-button">
        <Setter Property="Foreground" Value="{DynamicResource ButtonForeground}" />
    </Style>

    <Style Selector="Button.title-bar-button">
        <Setter Property="Width" Value="46"></Setter>
        <Setter Property="Height" Value="30"></Setter>
        <Setter Property="BorderThickness" Value="0"></Setter>
        <Setter Property="CornerRadius" Value="0"></Setter>
        <Setter Property="Margin" Value="0"></Setter>
        <Setter Property="Background" Value="Transparent"></Setter>
    </Style>
    <Style Selector="Button.title-bar-button:pointerover">
        <Setter Property="Background" Value="Red"></Setter>
    </Style>

	<Style Selector="ToggleButton:checked:pointerover /template/ Border#BorderElement">
		<Setter Property="BorderBrush" Value="{DynamicResource ToggleButtonBorderBrushCheckedPointerOver}" />
	</Style>
	<Style Selector="ToggleButton:checked:pointerover /template/ ContentPresenter#PART_ContentPresenter">
		<Setter Property="Background" Value="{DynamicResource ToggleButtonBackgroundCheckedPointerOver}" />
		<Setter Property="TextBlock.Foreground" Value="{DynamicResource ToggleButtonForegroundCheckedPointerOver}" />
	</Style>

	<Style Selector="ToggleButton:checked:pressed /template/ Border#BorderElement">
		<Setter Property="BorderBrush" Value="{DynamicResource ToggleButtonBorderBrushCheckedPressed}" />
	</Style>
	<Style Selector="ToggleButton:checked:pressed /template/ ContentPresenter#PART_ContentPresenter">
		<Setter Property="Background" Value="{DynamicResource ToggleButtonBackgroundCheckedPressed}" />
		<Setter Property="TextBlock.Foreground" Value="{DynamicResource ToggleButtonForegroundCheckedPressed}" />
	</Style>

	<Style Selector="ToggleButton:checked:disabled /template/ Border#BorderElement">
		<Setter Property="BorderBrush" Value="{DynamicResource ToggleButtonBorderBrushCheckedDisabled}" />
	</Style>
	<Style Selector="ToggleButton:checked:disabled /template/ ContentPresenter#PART_ContentPresenter">
		<Setter Property="Background" Value="{DynamicResource ToggleButtonBackgroundCheckedDisabled}" />
		<Setter Property="TextBlock.Foreground" Value="{DynamicResource ToggleButtonForegroundCheckedDisabled}" />
	</Style>
</Styles>