@namespace Connected.Components
@inherits Tabs

@{ 
    base.BuildRenderTree(__builder);
}

@code {


	protected override void OnInitialized()
    {
		base.Header = (context) => 
	@:@{
			if (string.IsNullOrEmpty(AddIconToolTip) == false)
			{
				<Tooltip Text="@AddIconToolTip">
					<IconButton Icon="@AddTabIcon" Class="@AddIconClass" Style="@AddIconStyle" OnClick="@AddTab" />
				</Tooltip>
			}
			else
			{
				<IconButton Icon="@AddTabIcon" Class="@AddIconClass" Style="@AddIconStyle" OnClick="@AddTab" />
			}
		}
		;

        base.TabPanelHeader = (context) =>  
	@:@{
			if (string.IsNullOrEmpty(CloseIconToolTip) == false)
			{
				<Tooltip Text="@CloseIconToolTip">
					<IconButton Icon="@CloseTabIcon" Class="@CloseIconClass" Style="@CloseIconStyle" OnClick="EventCallback.Factory.Create<MouseEventArgs>(this, () => CloseTab.InvokeAsync(context))" />
				</Tooltip>
			}
			else
			{
				<IconButton Icon="@CloseTabIcon" Class="@CloseIconClass" Style="@CloseIconStyle"  OnClick="EventCallback.Factory.Create<MouseEventArgs>(this, () => CloseTab.InvokeAsync(context))" />
			}
		}
		;
    }

}
