import Icon from "@ui5/webcomponents/dist/Icon.js"; import Button from "@ui5/webcomponents/dist/Button.js"; import type ShellBar from "./ShellBar.js"; import ShellBarPopoverTemplate from "./ShellBarPopoverTemplate.js"; import slimArrowDown from "@ui5/webcomponents-icons/dist/slim-arrow-down.js"; import ButtonBadge from "@ui5/webcomponents/dist/ButtonBadge.js"; export default function ShellBarTemplate(this: ShellBar) { return ( <>
{this.startButton.length > 0 && } {this.hasBranding && ( )} {this.hasMenuItems && !this.hasBranding && ( <> {!this.showLogoInMenuButton && this.hasLogo && singleLogo.call(this)} {this.showTitleInMenuButton &&

{this.primaryTitle}

} {this.showMenuButton && ( <> )} )} {this.hasMenuItems && ( // The secondary title remains visible when both menu items and the branding slot are present, // as the branding slot has higher priority and takes precedence in visibility. <> {this.secondaryTitle && !this.isSBreakPoint && (
{this.secondaryTitle}
)} )} {!this.hasMenuItems && ( <> {this.isSBreakPoint && this.hasLogo && !this.hasBranding && singleLogo.call(this)} {!this.isSBreakPoint && (this.hasLogo || this.primaryTitle) && ( <> {!this.hasBranding && combinedLogo.call(this)} {this.secondaryTitle && (this.primaryTitle || this.hasBranding) && (

{this.secondaryTitle}

)} )} )}
{this.hasMidContent && (
)}
{this.hasContentItems && (
{this.showStartSeparator && (
)} {this.startContent.map(item => { const itemInfo = this._contentInfo.find(info => info.id === (item as any)._individualSlot); return (
{this.shouldIncludeSeparator(itemInfo, this.startContentInfoSorted) && ( // never displayed, only "packed" with last item that was hidden, used for measurement purposes
)}
); })}
{this.endContent.map(item => { const itemInfo = this._contentInfo.find(info => info.id === (item as any)._individualSlot); return (
{this.shouldIncludeSeparator(itemInfo, this.endContentInfoSorted) && ( // never displayed, only "packed" with last item that was hidden, used for measurement purposes
)}
); })} {this.showEndSeparator && (
)}
)} {!this.hasContentItems &&
}
{this.hasSearchField && ( <> {this.showFullWidthSearch && (
)}
{!(this.hasSelfCollapsibleSearch || this.hideSearchButton) && ( )} {this.customItemsInfo.map(item => ( ))}
{this.hasProfile && profileButton.call(this)} {this.showProductSwitch && (
{ShellBarPopoverTemplate.call(this)} ); } function profileButton(this: ShellBar) { return ( ); } function singleLogo(this: ShellBar) { return ( ); } function combinedLogo(this: ShellBar) { return (
{this.hasLogo && ( )}
{this.primaryTitle && (

{this.primaryTitle}

)}
); }