import { ElementRef } from '@angular/core'; import { OnInit } from '@angular/core'; import * as i0 from "@angular/core"; /** * Goal: User can use this directive add the DOMs(Button, dropdown etc) in the toolbar. * User still use the buttons in toolbar but he has to add the buttons inside the `sn-toolbar` component. * But sometimes we have cases that the button is defined somewhere else on the page and we wish to add to the toolbar. * Most of these cases occurs also on the small devices. * Case: Cockpit core's top bar. Topbar has language and logout option. On small screens we want to * display those buttons in the toolbar. So in this case the button is defined outside. * * Since I have not found a solution to query directive outside from a component. * So a "weak" strategy is implement and works like this. * User uses this directive and use the inputs/feature he wants. Then this directive * will add some classes in dom and the `sn-toolbar` will query the DOMs and integrate in "itself". * * Since the cockpit ui is independent of core, thus we can not use the component in core directly. * To workaround this we can add the classes manually to the topbar's language and logout. And toolbar component * will detect automatically. */ /** * @deprecated in favor of TopMenuBarModule. */ export declare class ToolbarBtnDirective implements OnInit { private elmRef; static OtherToolbarButtonId: number; static TOOLBAR_BUTTON_LEFT_SIDE: string; static TOOLBAR_BUTTON_RIGHT_SIDE: string; static TOOLBAR_BUTTON_CLASS: string; static TOOLBAR_PAGE_BUTTON_CLASS: string; static TOOLBAR_GROUP_DIVIDER_CLASS: string; static TOOLBAR_STICK_MOBILE_VIEW_CLASS: string; /** * Show Current DOM/Button always in the Toolbar. */ set toolbarPageButton(v: boolean); get toolbarPageButton(): boolean; set enableToolbarBtn(v: boolean | string | null); get enableToolbarBtn(): boolean | string | null; private _enableToolbarBtn; /** * On Scrolling the page down, the button appears in the * the toolbar otherwise stay at the position where is defined. */ set toToolbarOnScroll(v: boolean); get toToolbarOnScroll(): boolean; set snToolbarButtonPosition(v: 'left' | 'right'); get snToolbarButtonPosition(): 'left' | 'right'; /** * The element will be shift in the toolbar when the toolbar switch to the mobile view. * Mainly created for core's topbar buttons: language selector, logout. */ set toToolbarOnSmallScreen(v: boolean); get toToolbarOnSmallScreen(): boolean; set sortOrderButtonIndex(v: number); get sortOrderButtonIndex(): number; /** * Adds a hr element to add divider before button */ set addDividerBefore(v: boolean); get addDividerBefore(): boolean; set toolbarClass(c: string); get toolbarClass(): string; constructor(elmRef: ElementRef); _toolbarPageButton: boolean; private _toToolbarOnScroll; private _toToolbarOnSmallScreen; private _toToolbarButtonPosition; private _addDividerBefore; private readonly rawButtonId; private _sortOrderButtonIndex; buttonId: string; _toolbarClass: string; get btnRelatedRoutes(): any[] | string; set btnRelatedRoutes(routes: any[] | string); _btnRelatedRoutes: never[]; private updateToolbarClasses; ngOnInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵdir: i0.ɵɵDirectiveDeclaration, "[sn-toolbar-btn], sn-toolbar-btn, snToolbarBtn, [snToolbarBtn]", never, { "toolbarPageButton": "toolbarPageButton"; "enableToolbarBtn": "snToolbarBtn"; "toToolbarOnScroll": "toToolbarOnScroll"; "snToolbarButtonPosition": "snToolbarButtonPosition"; "toToolbarOnSmallScreen": "toToolbarOnSmallScreen"; "sortOrderButtonIndex": "sortOrderButtonIndex"; "addDividerBefore": "addDividerBefore"; }, {}, never, never, false>; }