import type { EventEmitter } from '../../stencil-public-runtime'; import type { CookieBannerPosition, CookieBannerVariant, CookieCategory, CookieConsentDetail } from './mud-cookie-banner.types'; /** * Cookie banner — GDPR consent surface (molecule). * * Pattern B (composed molecule): renders its own header / body / categories / * footer in shadow DOM. Composes `mud-button`, `mud-switch`, `mud-icon`, * `mud-tag` and `mud-separator` for the interactive pieces. The host is a * non-modal dialog (`role="dialog" aria-modal="false"`) anchored to the bottom * or top edge of the viewport — it does NOT trap focus so the page underneath * stays operable. * * Two variants share one element: * * - `variant="simple"` (default) — three CTAs (`Personalizează` / `Refuză toate` * / `Accept toate`). The "Personalizează" button switches the banner to * expanded mode. * - `variant="detailed"` — same collapsed footprint, but expanding reveals a * category list (necessary / analytics / marketing by default) with per-row * `mud-switch`. Required categories render a fixed check-mark instead. * * Romanian voice ships as defaults; every label is overridable via the public * `@Prop` surface for localisation. * * @element mud-cookie-banner * * @slot body - Rich body copy. Overrides the `body` prop when populated. * @slot categories - Custom category UI. Replaces the built-in category list * when populated (the consumer takes full ownership of the * `mud-switch` wiring and the resulting consent payload). */ export declare class MudCookieBanner { /** * Layout flavour. * - `simple` (default) — three footer buttons, no category list on expand. * - `detailed` — adds a category list with per-row toggles in the expanded * state and a single "Salvează preferințele" footer CTA. * @default 'simple' */ variant: CookieBannerVariant; /** * Whether the banner is currently expanded (preferences view). * @default false */ expanded: boolean; /** * Edge the banner is anchored to. * @default 'bottom' */ position: CookieBannerPosition; /** Plain-text title. Defaults to Romanian "Folosim cookie-uri". */ titleText?: string; /** Plain-text body. Defaults to Romanian disclosure copy. Override via `body` slot for rich content. */ body?: string; /** "Accept all" button label. */ acceptLabel?: string; /** "Reject all" button label. */ rejectLabel?: string; /** "Customise / Manage cookies" button label. */ manageLabel?: string; /** "Save preferences" button label (shown only in detailed/expanded). */ saveLabel?: string; /** * Category catalogue rendered in detailed/expanded mode. Falls back to a * three-bucket Romanian default (necessary / analytics / marketing) when * omitted. Ignored when the `categories` slot is populated. */ categories?: ReadonlyArray; /** Optional href for the inline privacy-policy link. */ privacyHref?: string; /** Privacy-policy link label. Defaults to Romanian "Politica de confidențialitate". */ privacyLabel?: string; /** Close button accessible label. Defaults to Romanian "Închide". */ closeLabel?: string; /** * "Show more" toggle label for clamped category descriptions on mobile. * Defaults to Romanian "Mai mult". */ moreLabel?: string; /** * "Show less" toggle label for expanded category descriptions on mobile. * Defaults to Romanian "Mai puțin". */ lessLabel?: string; /** * Forwarded to the host as `aria-label`. Use this when the visible title is * not descriptive enough for screen-reader users. */ ariaLabel?: string; private hasBodySlot; private hasCategoriesSlot; private internalCategories; private isMobile; /** Per-category: whether the user has expanded the clamped description (mobile). */ private descExpanded; /** Per-category: whether the clamped description actually overflows 2 lines (mobile). */ private descOverflowing; host: HTMLMudCookieBannerElement; /** Fires when the user accepts every (non-required) category. */ mudAccept: EventEmitter; /** Fires when the user rejects every non-required category. */ mudReject: EventEmitter; /** Fires when the user saves a custom selection (detailed/expanded only). */ mudSavePreferences: EventEmitter; /** Fires when the banner transitions from collapsed → expanded. */ mudExpand: EventEmitter; /** Fires when the banner transitions from expanded → collapsed (via close / Esc). */ mudDismiss: EventEmitter; private readonly instanceId; private readonly titleId; private resizeObserver?; private descRefs; private measureRaf?; connectedCallback(): void; disconnectedCallback(): void; componentDidRender(): void; /** * Check whether each clamped (collapsed, mobile) category description overflows * its 2-line clamp — only then do we offer the "more"/"less" toggle. Guarded so * it only writes state on a real change, avoiding a render loop. Expanded * descriptions are skipped (not clamped, so overflow can't be measured) and * keep their prior value. */ private measureDescriptionOverflow; componentWillLoad(): void; handleCategoriesChange(next?: ReadonlyArray): void; handleVariantChange(next: CookieBannerVariant): void; handlePositionChange(next: CookieBannerPosition): void; handleDocumentKeydown(ev: KeyboardEvent): void; private resolveCategories; private syncInternalCategories; private buildAcceptAllPayload; private buildRejectAllPayload; private buildCurrentSelectionPayload; private onBodySlotChange; private onCategoriesSlotChange; private slotHasContent; private handleCategoryToggle; private toggleDescription; private collapseBanner; private expandBanner; private handleManageClick; private handleAcceptClick; private handleRejectClick; private handleSaveClick; private handleCloseClick; private renderHeader; private renderBody; private renderCategoryRow; private renderCategoriesSection; private renderFooter; render(): any; }