import { O as OrderlyElement, U as UiLanguage, D as DefaultShopConfig, a as DefaultShopNavigationLayout, P as PageLayoutConfig } from './default-shop-fSKaWxLQ.js';
import { S as StorefrontRouteMatch, g as StorefrontRouterConfig } from './types-CeigwmOf.js';
import { D as DefineOrderlyWebComponentsOptions } from './registry-CPDecU3g.js';
import { StoredImage, Credit } from '@orderlyshop/core-client';

type CookieConsentCategoryId = "necessary" | "preferences" | "statistics" | "marketing" | (string & {});
interface CookieConsentCategoryConfig {
    id: CookieConsentCategoryId;
    label: string;
    description: string;
    required?: boolean;
}
interface ManagedCookieConfig {
    /** Exact cookie name, or a simple wildcard pattern such as _ga_* for first-party cookies. */
    name: string;
    category: CookieConsentCategoryId;
    provider?: string;
    purpose?: string;
    duration?: string;
    path?: string;
    domain?: string;
}
interface CookieConsentTexts {
    title: string;
    description: string;
    policyLinkLabel: string;
    acceptAllLabel: string;
    rejectAllLabel: string;
    customizeLabel: string;
    saveLabel: string;
    backLabel: string;
    necessaryAlwaysOnLabel: string;
    preferencesButtonLabel: string;
}
interface CookieConsentConfig {
    /** Set false to disable the package consent UI/runtime. */
    enabled?: boolean;
    /** Consent record version. Change this when purposes, vendors, or cookie policy materially change. */
    version?: string;
    /** localStorage key used for the consent record. */
    storageKey?: string;
    /** Cookie/cookie policy URL shown in the first layer. */
    policyHref?: string;
    /** Optional category definitions. Necessary is always required. */
    categories?: CookieConsentCategoryConfig[];
    /** First-party cookies the package should delete when their category is rejected or withdrawn. */
    managedCookies?: ManagedCookieConfig[];
    /** Override default Danish consent copy. */
    texts?: Partial<CookieConsentTexts>;
    /** Show the banner automatically when no current consent exists. Defaults to true. */
    autoShow?: boolean;
    /** Show a persistent settings button after a choice, so withdrawal remains easy. Defaults to true. */
    showPreferencesButton?: boolean;
    /** Visual placement of the first-layer banner. Defaults to bottom. */
    position?: "bottom" | "center";
    /** Called whenever a consent choice is saved. */
    onChange?: (state: CookieConsentState) => void;
}
interface CookieConsentState {
    version: string;
    categories: Record<string, boolean>;
    updatedAt: string;
}
interface CookieWriteOptions {
    category?: CookieConsentCategoryId;
    path?: string;
    domain?: string;
    maxAge?: number;
    expires?: Date;
    sameSite?: "Strict" | "Lax" | "None";
    secure?: boolean;
}
type CookieConsentListener = (state: CookieConsentState) => void;
declare function configureCookieConsent(config?: CookieConsentConfig | undefined): void;
declare function resetCookieConsent(options?: {
    removeUi?: boolean;
}): void;
declare function isCookieConsentConfigured(): boolean;
declare function currentCookieConsent(): CookieConsentState | undefined;
declare function hasCookieConsent(category: CookieConsentCategoryId | CookieConsentCategoryId[] | false | undefined): boolean;
declare function saveCookieConsent(categories: Record<string, boolean>, options?: {
    persist?: boolean;
}): CookieConsentState;
declare function openCookieConsentPreferences(mode?: "banner" | "preferences"): void;
declare function closeCookieConsent(): void;
declare function addCookieConsentListener(listener: CookieConsentListener): () => void;
declare function setOrderlyCookie(name: string, value: string, options?: CookieWriteOptions): boolean;
declare function deleteOrderlyCookie(name: string, options?: Pick<CookieWriteOptions, "path" | "domain">): void;
declare function clearCookiesForCategory(category: CookieConsentCategoryId): void;

type DataLayerValue = string | number | boolean | null | undefined | DataLayerValue[] | {
    [key: string]: DataLayerValue;
};
type DataLayerObject = Record<string, DataLayerValue>;
type GoogleConsentValue = "granted" | "denied";
type GoogleConsentModeCommand = ["consent", "default" | "update", Record<string, GoogleConsentValue | number>];
type DataLayerEntry = DataLayerObject | GoogleConsentModeCommand;
type AnalyticsEventSource = "manual" | "page-view" | "product-list" | "product" | "basket" | "checkout" | "payment";
interface AnalyticsEvent {
    name: string;
    source: AnalyticsEventSource;
    payload: DataLayerObject;
}
interface AnalyticsConfig {
    /** Set false to disable package analytics without removing configuration code. */
    enabled?: boolean;
    /** Google Tag Manager container id, for example GTM-ABC1234. */
    googleTagManagerId?: string;
    /** Data layer name. Defaults to Google's standard dataLayer. */
    dataLayerName?: string;
    /** Insert the GTM script tag when googleTagManagerId is present. Defaults to true. */
    injectGoogleTagManager?: boolean;
    /** Optional CSP nonce applied to the injected GTM script. */
    nonce?: string;
    /** Currency used when a product or order does not carry one. Defaults to DKK. */
    defaultCurrency?: string;
    /** GA4 affiliation value added to ecommerce items and purchase events. */
    affiliation?: string;
    /** Add debug_mode to pushed GA4 event payloads. */
    debugMode?: boolean;
    /** Push page_view events for initial load and package-owned SPA route changes. Defaults to true. */
    trackPageViews?: boolean;
    /** Push GA4 ecommerce events from package-owned product, basket, checkout, and payment events. Defaults to true. */
    trackEcommerce?: boolean;
    /** Consent category or categories required before package analytics runs. Defaults to statistics when cookie consent is configured. Pass false to opt out of consent gating. */
    consentCategories?: CookieConsentCategoryId | CookieConsentCategoryId[] | false;
    /** Queue Google Consent Mode v2 default/update commands when package cookie consent is configured. Defaults to true. */
    googleConsentMode?: boolean;
    /** Called after every package analytics event, after the event has been pushed to dataLayer. */
    onEvent?: (event: AnalyticsEvent) => void;
}
declare global {
    interface Window {
        dataLayer?: DataLayerEntry[];
    }
}
declare function configureAnalytics(config?: AnalyticsConfig | undefined): void;
declare function resetAnalytics(options?: {
    removeInjectedTags?: boolean;
}): void;
declare function trackPageView(route?: Partial<StorefrontRouteMatch>): void;
declare function trackEcommerceEvent(name: string, ecommerce: DataLayerObject, source?: AnalyticsEventSource): void;
declare function pushAnalyticsEvent(name: string, payload?: DataLayerObject, source?: AnalyticsEventSource): void;
declare function pushDataLayer(payload: DataLayerEntry): void;

interface ShopFooterAddress {
    name?: string;
    street?: string;
    street2?: string;
    postalCode?: string;
    city?: string;
    region?: string;
    country?: string;
    lines?: string[];
}
interface ShopFooterContactItem {
    label: string;
    value: string;
    href?: string;
}
interface ShopFooterContact {
    email?: string;
    phone?: string;
    website?: string;
    items?: ShopFooterContactItem[];
}
interface ShopFooterOpeningHour {
    label: string;
    hours: string;
}
interface ShopFooterInformationLink {
    label: string;
    href: string;
    target?: string;
    rel?: string;
}
interface ShopFooterConfig {
    template?: HTMLTemplateElement | string;
    logoSrc?: string;
    logoAlt?: string;
    logoHref?: string;
    aboutText?: string;
    addressTitle?: string;
    contactTitle?: string;
    openingHoursTitle?: string;
    informationLinksTitle?: string;
    address?: ShopFooterAddress;
    contact?: ShopFooterContact;
    openingHours?: ShopFooterOpeningHour[];
    informationLinks?: ShopFooterInformationLink[];
}
declare function configureShopFooter(config: ShopFooterConfig): void;
declare class OrderlyShopFooterElement extends OrderlyElement {
    static observedAttributes: string[];
    private addressValue?;
    private contactValue?;
    private openingHoursValue?;
    private informationLinksValue?;
    get logoSrc(): string;
    set logoSrc(value: string);
    get logoAlt(): string;
    set logoAlt(value: string);
    get logoHref(): string;
    set logoHref(value: string);
    get aboutText(): string;
    set aboutText(value: string);
    get addressTitle(): string;
    set addressTitle(value: string);
    get contactTitle(): string;
    set contactTitle(value: string);
    get openingHoursTitle(): string;
    set openingHoursTitle(value: string);
    get informationLinksTitle(): string;
    set informationLinksTitle(value: string);
    get address(): ShopFooterAddress | undefined;
    set address(value: ShopFooterAddress | undefined);
    get contact(): ShopFooterContact | undefined;
    set contact(value: ShopFooterContact | undefined);
    get openingHours(): ShopFooterOpeningHour[];
    set openingHours(value: ShopFooterOpeningHour[]);
    get informationLinks(): ShopFooterInformationLink[];
    set informationLinks(value: ShopFooterInformationLink[]);
    attributeChangedCallback(): void;
    protected render(): void;
    private renderAddress;
    private renderContact;
    private renderOpeningHours;
    private renderInformationLinks;
}

type StoredImageUrlVariant = "thumbnail" | "object";
type StoredImageRole = "thumbnail" | "product-tile" | "product-detail" | "basket-line" | "checkout-line" | "fullsize" | (string & {});
interface StoredImageUrlOptions {
    /** Named image role. Roles resolve to configured width/height defaults. */
    role?: StoredImageRole;
    /** Desired rendered image resource width in physical pixels. */
    width?: number;
    /** Desired rendered image resource height in physical pixels. */
    height?: number;
}
type StoredImageRoleConfig = Pick<StoredImageUrlOptions, "width" | "height"> | false;
interface StoredImageUrlResolverOptions extends StoredImageUrlOptions {
    /** Requested CDN variant. */
    variant: StoredImageUrlVariant;
}
type StoredImageUrlResolver = (image: StoredImage, options: StoredImageUrlResolverOptions) => string | undefined;
declare const DEFAULT_IMAGE_BASE_URL = "https://orderlyproduction.azureedge.net/";
interface StoredImageUrlConfig {
    baseUrl?: string;
    thumbnailsPath?: string;
    objectsPath?: string;
    roles?: Record<string, StoredImageRoleConfig | undefined>;
    resolver?: StoredImageUrlResolver;
}
declare const DEFAULT_STORED_IMAGE_ROLES: Record<"thumbnail" | "product-tile" | "product-detail" | "basket-line" | "checkout-line" | "fullsize", StoredImageRoleConfig>;
interface CreditFormatOptions {
    locale?: string;
}
interface CreditFormatParts {
    prefix: string;
    amount: string;
    currency: string;
    text: string;
}
declare function configureStoredImageUrls(config: StoredImageUrlConfig): void;
declare function storedImageUrl(image: StoredImage | undefined, variant?: StoredImageUrlVariant, options?: StoredImageUrlOptions): string | undefined;
declare function formatCredit(credit: Credit | undefined, options?: CreditFormatOptions): string;
declare function formatCreditParts(credit: Credit | undefined, options?: CreditFormatOptions): CreditFormatParts;

type TemplateViewport = "desktop" | "mobile";
interface ResponsiveTemplateConfig {
    mobileMediaQuery?: string;
}
interface GlobalTemplateRegistration {
    name: string;
    template: HTMLTemplateElement | string;
    for?: string | string[];
    viewport?: TemplateViewport;
    media?: string;
}
declare function configureResponsiveTemplates(config?: ResponsiveTemplateConfig): void;
declare function currentTemplateViewport(): TemplateViewport;
declare function registerGlobalTemplate(registration: GlobalTemplateRegistration): () => void;
declare function clearGlobalTemplates(): void;

interface ShopConfig {
    /** UI language for built-in component copy. Defaults to Danish ("DA"). */
    uiLanguage?: UiLanguage | string;
    /** Shop-wide backend, navigation, query, basket, checkout, and copy defaults. */
    defaultShop?: DefaultShopConfig;
    /** Navigation placement/layout defaults for package-owned shop pages. */
    navigationLayout?: DefaultShopNavigationLayout;
    /** Client-side router for dynamic same-origin storefront navigation after first load. Enabled by default; set enabled false to opt out. */
    storefrontRouter?: StorefrontRouterConfig;
    /** Structural page layout defaults, including logo and optional layout template. */
    pageLayout?: PageLayoutConfig;
    /** Shared responsive template breakpoint configuration. */
    responsiveTemplates?: ResponsiveTemplateConfig;
    /** Default shop footer data when a shop does not provide a footer template. */
    shopFooter?: ShopFooterConfig;
    /** StoredImage URL resolver and CDN prefix configuration. */
    storedImageUrls?: StoredImageUrlConfig;
    /** Cookie consent UI, persistence, category gating, and first-party cookie cleanup. */
    consent?: CookieConsentConfig;
    /** Google Tag Manager installation and GA4-compatible navigation/ecommerce dataLayer hooks. */
    analytics?: AnalyticsConfig;
    /** Custom element registration options. Pass false when elements are registered elsewhere. */
    components?: DefineOrderlyWebComponentsOptions | false;
}
/** Configure the storefront defaults and register web components. */
declare function configureShop(config?: ShopConfig): void;

export { resetAnalytics as $, type AnalyticsConfig as A, closeCookieConsent as B, type CookieConsentCategoryConfig as C, DEFAULT_IMAGE_BASE_URL as D, configureAnalytics as E, configureCookieConsent as F, type GlobalTemplateRegistration as G, configureResponsiveTemplates as H, configureShop as I, configureShopFooter as J, configureStoredImageUrls as K, currentCookieConsent as L, type ManagedCookieConfig as M, currentTemplateViewport as N, OrderlyShopFooterElement as O, deleteOrderlyCookie as P, formatCredit as Q, type ResponsiveTemplateConfig as R, type StoredImageUrlVariant as S, type TemplateViewport as T, formatCreditParts as U, hasCookieConsent as V, isCookieConsentConfigured as W, openCookieConsentPreferences as X, pushAnalyticsEvent as Y, pushDataLayer as Z, registerGlobalTemplate as _, type StoredImageRole as a, resetCookieConsent as a0, saveCookieConsent as a1, setOrderlyCookie as a2, storedImageUrl as a3, trackEcommerceEvent as a4, trackPageView as a5, type AnalyticsEvent as b, type CookieConsentCategoryId as c, type CookieConsentConfig as d, type CookieConsentListener as e, type CookieConsentState as f, type CookieConsentTexts as g, type CookieWriteOptions as h, type CreditFormatOptions as i, type CreditFormatParts as j, DEFAULT_STORED_IMAGE_ROLES as k, type ShopConfig as l, type ShopFooterAddress as m, type ShopFooterConfig as n, type ShopFooterContact as o, type ShopFooterContactItem as p, type ShopFooterInformationLink as q, type ShopFooterOpeningHour as r, type StoredImageRoleConfig as s, type StoredImageUrlConfig as t, type StoredImageUrlOptions as u, type StoredImageUrlResolver as v, type StoredImageUrlResolverOptions as w, addCookieConsentListener as x, clearCookiesForCategory as y, clearGlobalTemplates as z };
