import { ClassValue } from 'clsx'; export { ClassValue, clsx } from 'clsx'; import Cookies from 'js-cookie'; import { Document } from '@contentful/rich-text-types'; import * as react from 'react'; import { ReactNode } from 'react'; import { Options } from '@contentful/rich-text-react-renderer'; /** * Utility function to combine class names using clsx * @param inputs - Class values to combine * @returns Combined class string */ declare const cx: (...val: ClassValue[]) => string; /** * Returns an inline SVG string for the SpeedCard pinwheel decorative * background. The two paths are filled with the provided color so callers * can theme the background dynamically (used by SimpleCard when * `showBackgroundImage` is enabled and a `pinwheelColor` is provided). * * Output is intended to be embedded as a `data:image/svg+xml;utf8,...` * `background-image`. Encode the result with `encodeURIComponent`. */ declare const SpeedCardBg: (color?: string) => string; /** * UTM Parameter Types * * Type definitions for UTM tracking parameters used across Kinetic applications. */ /** All tracked UTM and click-ID parameter names */ type UTMProperty = "utm_content" | "utm_medium" | "utm_campaign" | "utm_source" | "utm_term" | "utm_campaign_id" | "utm_adgroup_id" | "fbclid" | "gclid" | "msclkid"; /** Partial record of UTM parameter values */ type UTMProperties = Partial>; /** Segment campaign context schema */ interface CampaignProperties { name?: string; source?: string; medium?: string; term?: string; content?: string; campaign_id?: string; adgroup_id?: string; gclid?: string; fbclid?: string; msclkid?: string; } /** List of all UTM parameter names for filtering */ declare const UTM_PARAM_NAMES: UTMProperty[]; /** * Cookie Helpers for UTM Parameter Storage * * Provides Base64-encoded JSON cookie storage for UTM parameters. */ /** * Reads UTM parameters from the Base64-encoded cookie. * @returns Parsed UTMProperties or null if cookie doesn't exist / is invalid. */ declare function getUTMs(): UTMProperties | null; /** * Stores UTM parameters as a Base64-encoded JSON cookie. * @param utms - The UTM properties to store. * @param domain - Cookie domain (defaults to `.gokinetic.com`). */ declare function setUTMs(utms: UTMProperties, domain?: string): void; /** * Removes the UTM cookie. * @param domain - Cookie domain (defaults to `.gokinetic.com`). */ declare function removeUTMs(domain?: string): void; declare function getCookie(key: string): string | null; declare const getParsedCookie: (key: string) => any; declare const setCookie: (key: string, value: any, options: Cookies.CookieAttributes) => void; /** * UTM Parameter Helpers * * Functions for extracting, combining, and mapping UTM parameters * for marketing campaign attribution. */ /** * Extracts UTM parameters from the current page URL. * Parses window.location.search for the 10 tracked UTM/click-ID params. * @returns UTMProperties with any found values, or null if none found. */ declare function getUtmParametersFromURL(): UTMProperties | null; /** * Smart-merges existing (cookie) UTMs with newly arrived (URL) UTMs. * * Logic: * - If the same campaign (campaign, medium, source, campaign_id, adgroup_id, * fbclid, gclid, msclkid all match): preserve existing utm_content and * utm_term (first-touch attribution for ad content/keyword). * - If only campaign-level UTMs changed (no new content/term provided): * carry forward existing content/term from cookie. * - If completely different campaign: new UTMs fully overwrite. * * @param existing - UTM values currently stored in cookie. * @param incoming - UTM values extracted from the current URL. * @returns Merged UTMProperties. */ declare function combineExistingAndNewUTMs(existing: UTMProperties | null, incoming: UTMProperties | null): UTMProperties; /** * Generates synthetic UTM parameters for organic/direct traffic * based on document.referrer. * * - No referrer → direct / direct * - Google/Bing → organic / google or bing * - Other external site (not windstream.com) → referral / * - Internal (windstream.com) → null (no cookie set) * * @returns UTMProperties for organic traffic, or null for internal nav. */ declare function getOrganicTrafficUtmParameters(): UTMProperties | null; /** * Maps UTMProperties to Segment's campaign context schema. * @param utms - The UTM properties (typically from cookie). * @returns CampaignProperties for Segment context. */ declare function getCampaignProperties(utms: UTMProperties | null): CampaignProperties | null; /** * Builds a URL with non-UTM query params preserved and UTM params stripped. * Used by the Link/Button component when preserveQueryParameters is true. * * @param href - The target URL/path. * @param currentSearch - The current page's search string (e.g. "?foo=bar&utm_source=google"). * @returns The href with non-UTM params merged and UTM params removed. */ declare function buildPreservedQueryHref(href: string, currentSearch: string): string; declare const toDocument: (v: unknown | null | undefined) => Document | null; /** * Utility function to render Contentful Rich Text. * Safe to use inside .map() loops. */ declare function renderContentfulRichText(doc: Document | null | undefined, target?: boolean, className?: string, linkClassName?: string, options?: Options): ReactNode | null; declare function useContentfulRichText(doc: Document | null | undefined, options?: Options, config?: { boldClassName?: string; }): ReactNode | null; declare function renderContentfulRichTextTable(doc: Document | null | undefined, links?: any): ReactNode; declare const label1BoldOptions: { renderMark: { bold: (text: ReactNode) => react.DetailedReactHTMLElement<{ className: string; }, HTMLElement>; }; }; interface ProcessedChecklistItem { title: string; iconUrl?: string; anchorId?: string; } declare function useProcessedChecklist(checklistData?: any, titlesOnly?: T, richTextOptions?: Options, richTextClassName?: string): T extends true ? string[] : ProcessedChecklistItem[]; export { SpeedCardBg, UTM_PARAM_NAMES, buildPreservedQueryHref, combineExistingAndNewUTMs, cx, getCampaignProperties, getCookie, getOrganicTrafficUtmParameters, getParsedCookie, getUTMs, getUtmParametersFromURL, label1BoldOptions, removeUTMs, renderContentfulRichText, renderContentfulRichTextTable, setCookie, setUTMs, toDocument, useContentfulRichText, useProcessedChecklist }; export type { CampaignProperties, ProcessedChecklistItem, UTMProperties, UTMProperty };