import { EventEmitter } from "../../stencil-public-runtime"; import { DuetAnalyticsEvent, DuetLanguage, DuetMargin, DuetTheme } from "../../common-types"; import { ThemeableComponent } from "../../common/themeable-component"; import { DuetLangObject } from "../../utils/language-utils"; export type DuetFooterVariation = "default" | "simple" | "multilevel"; export type DuetFooterItem = { label: string; href?: string; id?: string; analyticsId?: string; external?: boolean; data?: [string: string]; }; export type DuetFooterChangeEvent = { component: "duet-footer"; data: DuetFooterItem; originalEvent: Event; }; export type DuetFooterAnalyticsEvent = DuetAnalyticsEvent<"duet-footer">; /** * @slot extra - A slot for extra links. * @slot info - A slot for additional info above footer items. * @part top - piercing selector for styling the top part of the footer * @part menu - piercing selector for styling the menu section of the footer */ export declare class DuetFooter implements ThemeableComponent { /** * Own Properties */ private hasInfoSlot?; /** * Reference to host HTML element. */ element: HTMLElement; /** * State() variables * Inlined decorator, alphabetical order. */ processedMainItem: DuetFooterItem; processedItems: DuetFooterItem[]; processedMenu: DuetFooterItem[]; /** * Theme of the navigation. */ theme: DuetTheme; /** * Style variation of the footer. */ variation: DuetFooterVariation; /** * Controls the margin of the component. */ margin: DuetMargin; /** * URL that the logo link points to. */ logoHref: string; /** * The currently active language. This setting changes the logo to match the * chosen language. * @deprecated this is now handled via the html lang tag, and is no longer used - kept to avoid breaking changes and ease unit testing * @default "fi" */ language: DuetLanguage; /** * An array of items for the main footer links. Items have to include mandatory * "label" and "href" fields to work. Additionally, you can pass an "id" * that is added as an HTML identifier for the anchor tag. * Also data object can be given to set data attributes to items. * Note that previously mandatory "icon" field has now been removed - setting it has no effect. */ items: any; /** * Accessible label for footer */ accessibleLabel: string; /** * Property to change accessibleLabelExternal defaults on the component. * normally you would handle these strings on an application level and override accessibleLabelExternal when needed * @default {fi: "Avautuu uuteen ikkunaan",sv: "Öppnas i nytt fönster",en: "Opens in a new window"} */ accessibleLabelExternalDefaults: DuetLangObject | string; /** * Adds accessible label for tooltip that is shown in external link (url & external have both been set) * @default {fi: "Avautuu uuteen ikkunaan",sv: "Öppnas i nytt fönster",en: "Opens in a new window"} */ accessibleLabelExternal: string; /** * An array of items for the small footer menu. Items have to include mandatory * "label" and "href" fields to work. * Also data object can be given to set data attributes to items. * Additionally, you can pass an "id" that is added as an HTML identifier for the anchor tag. */ menu: any; /** * @deprecated in favour of the more specific events like duetLogoClick. * Callback for when a user is about to navigate to another page. You can prevent * the default browser functionality by calling **event.detail.originalEvent.preventDefault()** * inside your listener. Additionally, the passed data is available via * **event.detail.data**. */ duetChange: EventEmitter; /** * Event raised when the logo is clicked. You can prevent * the default browser functionality by calling **event.detail.originalEvent.preventDefault()** * inside your listener. Additionally, the passed data is available via * **event.detail.data**. */ duetLogoClick: EventEmitter; /** * Event raised when the menu links are clicked. You can prevent * the default browser functionality by calling **event.detail.originalEvent.preventDefault()** * inside your listener. Additionally, the passed data is available via * **event.detail.data**. */ duetMenuClick: EventEmitter; /** * Event raised when the items are clicked. You can prevent * the default browser functionality by calling **event.detail.originalEvent.preventDefault()** * inside your listener. Additionally, the passed data is available via * **event.detail.data**. */ duetItemClick: EventEmitter; /** * Event raised when an items with an associated analytics ID is clicked. Analytics ID can be * accessed via **event.detail.analyticsId** */ duetAnalytics: EventEmitter; /** * General event stream for the following events: * item: onMouseEnter, onTouchDown; * menuItem: onMouseEnter, onTouchDown;. * You can prevent * the default browser functionality by calling **event.detail.originalEvent.preventDefault()** * inside your listener. Additionally, the passed data is available via * **event.detail.data**. */ duetEvent: EventEmitter; /** * Component lifecycle events. */ componentWillLoad(): void; connectedCallback(): void; disconnectedCallback(): void; /** * Component event handling. */ private handleClick; private handleLogoClick; private handleMenuClick; private handleItemClick; private emitDuetEvent; private setDataAttributes; /** * Local methods */ private refresh; private getTopItemButtonIcon; private isMessagingLink; /** * render() function * Always the last one in the class. */ render(): any; }