using Connected.Annotations;
using Connected.Extensions;
using Connected.Utilities;
using Microsoft.AspNetCore.Components;
namespace Connected.Components;
public partial class Fab : ButtonBase
{
protected string Classname =>
new CssBuilder("mud-button-root mud-fab")
.AddClass($"mud-fab-extended", !string.IsNullOrEmpty(Label))
.AddClass($"mud-fab-{Color.ToDescriptionString()}")
.AddClass($"mud-fab-size-{Size.ToDescriptionString()}")
.AddClass($"mud-ripple", !DisableRipple && !Disabled)
.AddClass($"mud-fab-disable-elevation", DisableElevation)
.AddClass(Class)
.Build();
///
/// The color of the component. It supports the theme colors.
///
[Parameter]
[Category(CategoryTypes.Button.Appearance)]
public ThemeColor Color { get; set; } = ThemeColor.Default;
///
/// The Size of the component.
///
[Parameter]
[Category(CategoryTypes.Button.Appearance)]
public Size Size { get; set; } = Size.Large;
///
/// If applied Icon will be added at the start of the component.
///
[Obsolete("This property is obsolete. Use StartIcon instead.")][Parameter] public string Icon { get => StartIcon; set => StartIcon = value; }
///
/// If applied Icon will be added at the start of the component.
///
[Parameter]
[Category(CategoryTypes.Button.Behavior)]
public string StartIcon { get; set; }
///
/// If applied Icon will be added at the end of the component.
///
[Parameter]
[Category(CategoryTypes.Button.Behavior)]
public string EndIcon { get; set; }
///
/// The color of the icon. It supports the theme colors.
///
[Parameter]
[Category(CategoryTypes.Button.Appearance)]
public ThemeColor IconColor { get; set; } = ThemeColor.Inherit;
///
/// The size of the icon.
///
[Parameter]
[Category(CategoryTypes.Button.Appearance)]
public Size IconSize { get; set; } = Size.Medium;
///
/// If applied the text will be added to the component.
///
[Parameter]
[Category(CategoryTypes.Button.Behavior)]
public string Label { get; set; }
///
/// Title of the icon used for accessibility.
///
[Parameter]
[Category(CategoryTypes.Button.Behavior)]
public string Title { get; set; }
}