@let isLargeLayout = variant === toolbarVariant.Large;
@for (item of data; let index = $index; track index) { @let name = item.name; @let title = item.title; @let isSmallActive = !isLargeLayout && selectedTab === name; @let isSmallAndInActive = !isLargeLayout && selectedTab !== name; @let isLargeAndActive = isLargeLayout && selectedTab === title; @let isLargeAndInActive = isLargeLayout && selectedTab !== title; @let isDisabled = item.isDisabled; @let tabClasses = { isLargeLayout, isLargeAndActive, isLargeAndInActive, isSmallActive, isSmallAndInActive, isDisabled: isDisabled ?? false, } | toolbarTabsClassPipe;
{{ isLargeLayout ? title : name }}
@if (isLargeLayout) { @let counterText = item.length; @let counterClass = selectedTab === title ? 'background-white text-color-black' : 'background-muted text-color-white'; @let widthClass = counterText && counterText > 99 ? 'w-20' : counterText && counterText > 9 ? 'w-14' : 'w-8';
{{ counterText }}
}
}