using Connected.Utilities;
using Microsoft.AspNetCore.Components;

namespace Connected.Components;

public partial class Button : ButtonBase
{
	/// <summary>
	/// Contains the default container classlist and the user defined classes.
	/// </summary>
	private CssBuilder CompiledClassList
	{
		get
		{
			return new CssBuilder("button-root mud-button")
			.AddClass($"button-{Variant}")
			.AddClass(ClassList);
		}
	}

	#region Styling properties
	/// <summary>
	/// Child content of component.
	/// </summary>
	[Parameter]
	public RenderFragment? ChildContent { get; set; }

	/// <summary>
	/// A space separated list of class names, added on top of the default class list.
	/// </summary>
	[Parameter]
	public string? ClassList { get; set; }

	/// <summary>
	/// The variant to use.
	/// </summary>
	[Parameter]
	public Variant Variant { get; set; } = Variant.Text;
	#endregion

}
