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

namespace Connected.Components;

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

	/// <summary>
	/// Child content of component, only shows if Glyph is null or Empty.
	/// </summary>
	[Parameter]
	public RenderFragment? ChildContent { get; set; }

	#region EventCallbacks
	#endregion

	#region Content placeholders
	/// <summary>
	/// The Glyph that will be used in the component.
	/// </summary>
	[Parameter]
	public string? Glyph { get; set; }

	/// <summary>
	/// GlyphTitle of the icon used for accessibility.
	/// </summary>
	[Parameter]
	public string? GlyphTitle { get; set; }
	#endregion

	#region Styling properties
	/// <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
}
