import React from "react"; import type { LsgButtonVariant } from "../LsgButton"; import type { LsgDownloadLibraryControllerOptions } from "./LsgDownloadLibraryController"; import "./LsgDownloadLibrary.scss"; /** "open" for PDFs and external links (new tab), "download" for everything else. */ export type LsgDownloadAction = "download" | "open"; export type LsgDownloadSource = "children" | "static" | "staticExternal"; /** Policy "Download button display": a square icon, or a text button. */ export type LsgDownloadCtaDisplay = "icon" | "label"; /** Palette tokens offered by the policy's "Background color" and "Accent color" style groups. */ export type LsgDownloadColour = "white" | "light" | "primary" | "secondary" | "tertiary" | "dark" | "black"; export type LsgDownloadAccent = LsgDownloadColour; export type LsgDownloadBackground = LsgDownloadColour; export type LsgDownloadTextColour = LsgDownloadColour; export interface LsgDownloadVariant { languageCode: string; languageLabel: string; url: string; selected?: boolean; } export interface LsgDownloadItem { id: string; title: string; url: string; type?: string; size?: string; description?: string; tags?: string[]; imageUrl?: string; external?: boolean; action: LsgDownloadAction; /** Selected variant first (the model always orders them that way). */ variants?: LsgDownloadVariant[]; } export interface LsgDownloadLibraryStrings { /** `{0}` = document title. */ download: string; /** `{0}` = document title. */ open: string; /** Visible text of a label-display button. */ downloadLabel: string; openLabel: string; /** Appended (visually hidden) to a label-display "Open" button. */ newTab: string; language: string; type: string; size: string; close: string; dialogTitle: string; successTitle: string; successText: string; successLinkLabel: string; /** `{0}` = form page path. Author (edit mode) only. */ authorNote: string; emptyPlaceholder: string; } /** Same defaults as the HTL (i18n keys / dialog emptyText). */ export declare const LSG_DOWNLOAD_LIBRARY_STRINGS: LsgDownloadLibraryStrings; export interface LsgDownloadLibraryHubspotProperties { title?: string; url?: string; language?: string; } export interface LsgDownloadLibraryProps { items: LsgDownloadItem[]; /** AEM `overlayId` ("lsg-download-overlay-"); also the dialog id. */ libraryId?: string; source?: LsgDownloadSource; /** True when a valid LSG overlay (form) page is configured. */ gated?: boolean; /** Overlay page path; also the session unlock key. */ formPath?: string; /** * Policy "Download button style" — shape only: "primary" = filled, "secondary" = outlined * (the colour comes from `accent`). Other LSG Button types still render, for old policies. */ ctaVariant?: LsgButtonVariant; /** Policy "Download button display". */ ctaDisplay?: LsgDownloadCtaDisplay; /** Policy "Background color" (`lsg-download-library--bg-{token}`): the card background. */ background?: LsgDownloadBackground; /** Policy "Text color" (`lsg-download-library--text-{token}`): all text (dropdown included) and the download icon. */ textColour?: LsgDownloadTextColour; /** * Policy "Accent color" (`lsg-download-library--accent-{token}`): download button, dropdown * background, theme-2 rule, theme-3 title band. Unset keeps each theme's default. */ accent?: LsgDownloadAccent; /** Policy HubSpot hidden-field property names. Leave empty to send nothing. */ hubspotProperties?: LsgDownloadLibraryHubspotProperties; strings?: Partial; /** * Stands in for the overlay page's root container (`data-sly-resource` with decoration in AEM): * `div.cmp-container` + its Style System classes, holding the title, text and VTBA form. */ form?: React.ReactNode; /** AEM edit mode: no JS hook, no dialog, author note instead. */ isEditMode?: boolean; /** Style-system classes on the outer section. */ className?: string; controllerOptions?: LsgDownloadLibraryControllerOptions; } export declare const LsgDownloadLibrary: React.FC;