import { EventEmitter } from '../../stencil-public-runtime'; /** A `quickLinks` item. Every field is optional; the header accepts two shapes. * 5.x: `{ label, href, menuLabel, subMenu }`, with `subMenu` items `{ title, description, icon, href }`. * 3.x: `{ type, headerMenuLabel, url, active, headerMenuId, defaultSubMenuTitle, children }`; a * `dda_main_megamenu` item has column children `{ title, items }`. */ export interface QuickLinkItem { label?: string; href?: string; menuLabel?: string; subMenu?: Array<{ title?: string; description?: string; icon?: string; href?: string; }>; type?: string; headerMenuLabel?: string; url?: string; active?: boolean | string; headerMenuId?: string; defaultSubMenuTitle?: string; children?: QuickLinkItem[]; quickLinksIcon?: string; description?: string; title?: string; items?: QuickLinkItem[]; } export declare class DdaHeader { el: HTMLElement; /** Image URL of the first (government) logo, on the left of the header and in the side menu. */ firstLogoSrc: string; /** Image URL of the white first logo, shown in dark theme and on a transparent header (``). Falls back to `firstLogoSrc`. */ firstLogoWhiteSrc: string; /** Alternative text for the first logo. */ firstLogoAlt: string; /** Link URL of the first logo in the header and the side menu. Default: `/`. */ firstLogoHref: string; /** Image URL of the second (entity) logo. */ secondLogoSrc: string; /** Image URL of the white second logo, shown in dark theme and on a transparent header. Falls back to `secondLogoSrc` on desktop. */ secondLogoWhiteSrc: string; /** Alternative text for the second logo. */ secondLogoAlt: string; /** Link URL of the second logo on desktop and mobile. Default: `/`. */ secondLogoHref: string; /** URL of the Login link in the toolbar and the side menu. */ loginLink: string; /** Side menu items. JSON array of `{ label, href, subMenu }`; each `subMenu` item is `{ headerLabel, label, href, subMenu }` and can nest. */ sideMenuItems: string; /** Title above the side-menu links. Default: `Quick Links`. An empty value removes it. */ sideMainMenuTitle: string; /** Title above the "other" side-menu links. It shows only when there are other links. */ sideOtherMenuTitle: string; /** Second list in the side menu. JSON array (or array property) of `{ label, href, active }`; `active: "true"` marks the current page. */ otherMenuItems: string | Array<{ label: string; href: string; active?: string; }>; /** Hides the "other" side-menu links and their title. Default: `false`. */ hideOtherMenu: boolean; /** `id` of the mobile search control. */ mobileMenuSearchId: string; /** 3.x mobile search: when set, the mobile search is a plain link to this URL (with `mobileMenuSearchId` as its id) and the header's own search panel is not rendered. */ mobileMenuSearchUrl: string; /** Main navigation links: a JSON array (HTML attribute) or an array (JavaScript property). 5.x items are `{ label, href, menuLabel, subMenu }`; `subMenu` items are `{ title, description, icon, href }` and open a mega menu. 3.x items (`{ type, headerMenuLabel, url, children, ... }`) also work. */ quickLinks: string | QuickLinkItem[]; /** URL of the ReadSpeaker "listen" link in the accessibility panel. */ readSpeakerLink: string; /** 3.x name of `readSpeakerLink`, as an attribute: `read_speaker_link`. `readSpeakerLink` wins when both are set. */ read_speaker_link: string; /** Heading of the contrast column in the accessibility panel. Default: `Contrast`. An empty value removes the heading. */ contrast_title: string; /** Text above the contrast options. Default: `Select your preferred contrast setting`. */ contrast_description: string; /** Label of the normal contrast option. Default: `Normal`. */ contrast_normal_text: string; /** 3.x spelling of `contrast_normal_text`. `contrast_normal_text` wins when both are set. */ contrast_noraml_text: string; /** Label of the colour-blind contrast option. Default: `Colours Blind`. */ contrast_color_blind_text: string; /** Label of the red-weakness contrast option. Default: `Red Weakness`. */ contrast_red_weakness_text: string; /** Label of the green-weakness contrast option. Default: `Green Weakness`. */ contrast_green_weakness_text: string; /** Heading of the screen reader column. Default: `Screen Reader`. */ screen_reader_title: string; /** Text in the screen reader column. Default: `Listen to the content of the page by clicking play or listen`. */ screen_reader_description: string; /** Accessible name of the ReadSpeaker play link. Default: `Listen to this page using ReadSpeaker`. */ screen_reader_link_label: string; /** Heading of the text size column. Default: `Text Size`. */ text_size_title: string; /** Text in the text size column. Default: `Use the buttons below to increase or decrease the text size`. */ text_size_description: string; /** The contrast option shown as selected. The header updates it when the user picks an option. Default: `normal`. */ selected_contrast: 'normal' | 'colorblind' | 'redweakness' | 'greenweakness'; /** The text size button shown as selected (`default-primary`). The header updates it on each click. Default: none. */ selected_text_size: 'small' | 'normal' | 'large'; /** Placeholder and accessible label of the search input. Default: `Search`. */ searchText: string; /** Material Symbols icon name of the Login link in the desktop toolbar and the side menu. Default: `sentiment_satisfied`. */ loginIcon: string; /** Label of the Login link in the desktop toolbar and the side menu. Default: `Login`. An empty value removes the Login link. */ loginText: string; /** Hides the Login link in the desktop toolbar and the side menu. */ hide_login: boolean; /** Label of the language buttons in the desktop toolbar and the side menu. Default: `العربية`. An empty value removes the language buttons. */ language_text: string; /** `lang` attribute of the language buttons, the language of `language_text`. Default: `ar`. */ language_lang: string; /** Tooltip of the desktop accessibility button. Default: `Accessibility`. */ accessibility_tooltip: string; /** Accessible name (visually hidden text) of both accessibility buttons. Default: `Accessibility`. */ accessibility_button_text: string; /** `id` of the desktop accessibility button. The side-menu button gets this id plus `-sidemenu`. */ accessibility_button_id: string; /** `class` of the accessibility button icon. Default: `material-icons material-symbols-outlined`. */ accessibility_button_icon_family: string; /** Material icon name of the accessibility buttons. Default: `accessibility`. */ accessibility_button_icon_name: string; /** Tooltip of the desktop search. Default: `Search`. */ search_tooltip: string; /** Placeholder of the search inputs. Default: the `searchText` value, else `Search`. */ search_input_placeholder: string; /** Tooltip of the desktop language button. Default: `Language`. */ language_tooltip: string; /** Tooltip of the desktop Login link. Default: the Login label. */ login_tooltip: string; /** When `false`, the header renders no accessibility panel; the buttons only emit `accessibilitymenufunctionality`, so the page can open its own panel. Default: `true`. */ usePredesignedAccessibilityMenu: boolean; /** Emitted on every click of an accessibility button (3.x name). */ accessibilityMenuToggle: EventEmitter; /** Emitted with the query when a non-empty search is submitted (3.x name). Pages that open a results page from this event keep working. `searchSubmit` is the 5.x event, and it can cancel the navigation. */ searchInput: EventEmitter; /** Emitted when the user clicks the language button. */ languageSwitch: EventEmitter; /** Emitted when the user clicks the `A-` (smaller text) button in the accessibility panel. */ smTextSize: EventEmitter; /** Emitted when the user clicks the `A` (default text size) button in the accessibility panel. */ baseTextSize: EventEmitter; /** Emitted when the user clicks the `A+` (larger text) button in the accessibility panel. */ lgTextSize: EventEmitter; /** Emitted when the user selects the Normal contrast option. */ normalContrast: EventEmitter; /** Emitted when the user selects the Colours Blind contrast option. */ blindContrast: EventEmitter; /** Emitted when the user selects the Red Weakness contrast option. */ redContrast: EventEmitter; /** Emitted when the user selects the Green Weakness contrast option. */ greenContrast: EventEmitter; /** * Emitted when a non-empty search is submitted. Call `preventDefault()` to stop the * browser navigating to `search_action`, for example to route inside a single-page app. */ searchSubmit: EventEmitter<{ query: string; }>; isMenuOpen: boolean; isSubMenuOpen: boolean; isSideSubMenuOpen: boolean; isAccessibiltyOpen: boolean; isSearchOpen: boolean; private readonly searchId; private mobileSearchButton; private mobileSearchInput; private focusSearchAfterRender; private lastScrollTop; /** `name` attribute of the hamburger menu button. */ hamburger_menu_button_name: string; /** Accessible name of the hamburger menu button (visually hidden text). Default: `Menu`. */ menu_button_label: string; /** `name` attribute of the accessibility button in the side menu. */ accessibility_button_name: string; /** `name` attribute of the mobile search button. */ search_button_name: string; /** `name` of the search input, which is the query parameter sent to `search_action`. Default: `q`. */ search_input_name: string; /** Results page URL. When set, a search does a GET to this URL with the query in `search_input_name` (default `q`). */ search_action: string; /** `name` attribute of the language button in the side menu. */ language_button_name: string; /** `name` attribute of the button that closes the side menu. */ close_menu_button_name: string; /** `name` attribute of the buttons that close the accessibility panel. */ close_accessibility_button_name: string; /** Not used: the current markup does not render an element with this name. */ close_sidebar_button_name: string; /** `name` attribute of the accessibility button in the desktop toolbar. */ toggle_accessibility_button_name: string; openMenus: { [index: string]: boolean; }; activeMenuIndex: number | null; activeSubIndex: number | null; /** Offset (px) from the top of the open dropdown to the opener of its third-level panel. */ activeSubTop: number; toggleSidebarSubMenu(index: string): void; toggleEscapeKey: (event: KeyboardEvent) => void; componentDidLoad(): void; componentDidRender(): void; disconnectedCallback(): void; private alignMegaPanel; private get languageDir(); onMenuOpenChange(isOpen: boolean): void; private lockPageScroll; private handleSearchSubmit; private openMobileSearch; private closeMobileSearch; componentDidUpdate(): void; private renderSearchInput; handleOutsideClick: (event: MouseEvent) => void; handleOutsideAccessibilityClick: (event: MouseEvent) => void; handleOutsideMegaMenuClick: (event: MouseEvent) => void; private updateScrolled; handleScroll: () => void; private parseJsonArray; private toggleMenu; private toggleSubMenu; private toggleAccessibilty; private languagehandler; private text; private smTexthandler; private baseTexthandler; private lgTexthandler; private normalContrasthandler; private blindContrasthandler; private redContrasthandler; private greenContrasthandler; renderSubMenu: (subMenu: any, parentLi: any) => any; private renderAccessibilityColumns; private tooltip; private get loginLabel(); private get showLogin(); private get languageLabel(); private renderAccessibilityButton; private renderDropdown; /** The id of the dropdown or mega panel that top-level item `index` opens. */ private menuPanelId; private renderMega; render(): any; }