import { B as BasketChangeReason, b as NavigationDefinition, h as SortOption, i as StorefrontProductUrlMode, j as StorefrontProductRouteConfig, k as BasketDisplayMode, c as CategoryUrlMode, a as NavigationLayout, R as ResolvedNavigationItem } from './types-CeigwmOf.js';
import { DraftOrder, SearchObject, DraftOrderLine, OrderlyClient, TransportMethod, ServicePointHeader, TransportMethodQuerySchema, ServicePointQuerySchema, PageResult, SearchQuery } from '@orderlyshop/core-client';
import { MessageInitShape } from '@bufbuild/protobuf';
import { BasketStore, OrderStore } from './stores.js';

declare class BasketController extends EventTarget {
    private readonly store;
    private currentDraft;
    private loaded;
    private loadPromise?;
    constructor(store?: BasketStore);
    get draft(): DraftOrder;
    get count(): number;
    hasProduct(product: SearchObject): boolean;
    productLineIndex(product: SearchObject): number;
    load(options?: {
        force?: boolean;
    }): Promise<DraftOrder>;
    setDraft(draft: DraftOrder, reason?: BasketChangeReason): Promise<void>;
    persist(reason?: BasketChangeReason, options?: {
        emit?: boolean;
    }): Promise<void>;
    addProduct(product: SearchObject, quantity?: number): Promise<void>;
    setQuantity(index: number, quantity: number): Promise<void>;
    removeLine(index: number): Promise<void>;
    removeProduct(product: SearchObject): Promise<void>;
    clear(): Promise<void>;
    private emitChange;
}
declare const defaultBasketController: BasketController;
declare function createBasketController(options?: {
    store?: BasketStore;
    draft?: DraftOrder;
}): BasketController;
declare function draftOrderItemCount(draft: DraftOrder): number;
declare function dispatchBasketDraftEvent(target: EventTarget, type: string, draft: DraftOrder, reason?: BasketChangeReason, init?: Omit<CustomEventInit<DraftOrder>, "detail">): boolean;
declare function productToDraftLine(product: SearchObject, quantity?: number): DraftOrderLine;

declare abstract class OrderlyElement extends HTMLElement {
    private resolvedClient?;
    private renderQueued;
    private disconnectResponsiveTemplates?;
    private lastResponsiveTemplateSignature;
    get client(): OrderlyClient | undefined;
    set client(value: OrderlyClient | undefined);
    get baseUrl(): string | undefined;
    set baseUrl(value: string | undefined);
    connectedCallback(): void;
    disconnectedCallback(): void;
    protected getClient(): OrderlyClient;
    protected getDefaultBaseUrl(): string | undefined;
    protected requestRender(): void;
    protected abstract render(): void;
}

interface CheckoutLabels {
    customerTitle?: string;
    addressTitle?: string;
    deliveryTitle?: string;
    terms?: string;
    termsLink?: string;
    firstName?: string;
    lastName?: string;
    email?: string;
    phoneCountry?: string;
    phone?: string;
    company?: string;
    street?: string;
    street2?: string;
    zip?: string;
    city?: string;
    country?: string;
    deliveryMethod?: string;
    servicePoint?: string;
    deliveryAddressPrompt?: string;
    noDeliveryMethods?: string;
    servicePointHelp?: string;
    noServicePoints?: string;
    servicePointsError?: string;
    submit?: string;
    submitting?: string;
    error?: string;
    invalidEmail?: string;
    invalidPhone?: string;
}
declare class OrderlyCheckoutElement extends OrderlyElement {
    static observedAttributes: string[];
    private controllerValue;
    deliveryMethods: TransportMethod[];
    servicePoints: ServicePointHeader[];
    selectedDeliveryMethod?: TransportMethod;
    selectedServicePoint?: ServicePointHeader;
    loading: boolean;
    error?: unknown;
    private labelValues;
    private deliveryMethodsLoading;
    private servicePointsLoading;
    private servicePointsError?;
    private restoreOptionsRevision;
    private restoredDeliveryVerifySignature?;
    private deliveryRefreshTimer;
    private deliveryRefreshRevision;
    private draftPersistTimer;
    private postalCodeLookupTimer;
    private postalCodeLookupSequence;
    private lastAutoFilledCity;
    private readonly postalCodeCityCache;
    private readonly checkoutFormId;
    private currentActionsContainer?;
    private currentOrderStore;
    private termsAccepted;
    private termsControlPresent;
    paymentLinkNavigator?: (url: string) => void;
    get basketController(): BasketController;
    set basketController(value: BasketController);
    get termsHref(): string;
    set termsHref(value: string);
    get labels(): CheckoutLabels;
    set labels(value: CheckoutLabels);
    get actionsContainer(): HTMLElement | undefined;
    set actionsContainer(value: HTMLElement | undefined);
    get orderStore(): OrderStore;
    set orderStore(value: OrderStore);
    attributeChangedCallback(): void;
    connectedCallback(): void;
    disconnectedCallback(): void;
    loadDeliveryMethods(query?: MessageInitShape<typeof TransportMethodQuerySchema>): Promise<TransportMethod[]>;
    loadServicePoints(query?: MessageInitShape<typeof ServicePointQuerySchema>): Promise<ServicePointHeader[]>;
    submit(): Promise<void>;
    protected render(): void;
    private resolvedLabels;
    private label;
    private syncStateFromDraft;
    private hydrateProfile;
    private renderDeliveryOptions;
    private collectProfile;
    private collectProfileFrom;
    private persistDraftProfile;
    private prepareDraftForCreate;
    private ensureDefaultPaymentMethod;
    private configurePhoneCountryPicker;
    private configureAutofillHints;
    private configureActionPlacement;
    private configureSubmitState;
    private canSubmitOrder;
    private hasSelectedDelivery;
    private openPaymentLink;
    private saveCreatedOrder;
    private configureTermsControls;
    private checkoutControlRoots;
    private checkoutActionGroup;
    private readonly onDraftChange;
    private scheduleRestorePersistedDeliveryOptions;
    private restorePersistedDeliveryOptions;
    private shouldVerifyRestoredDelivery;
    private restoredDeliverySignature;
    private configureContactValidation;
    private validateContactFields;
    private configureAddressRefresh;
    private scheduleDraftPersistence;
    private schedulePostalCodeLookupIfNeeded;
    private schedulePostalCodeLookup;
    private lookupCityFromPostalCode;
    private resolveDanishPostalCodeCity;
    private scheduleDeliveryRefresh;
    private refreshDeliveryOptions;
    private isCurrentDeliveryRefresh;
    private renderDeliveryMethodCards;
    private renderServicePointCards;
    private selectDeliveryMethod;
    private selectServicePoint;
    private ensureSelectedDeliveryMethod;
    private ensureSelectedServicePoint;
    private selectedDeliveryMethodIndex;
    private selectedServicePointIndex;
    private servicePointQuery;
    private tryLoadServicePoints;
    private verifySelectedDelivery;
    private transportDetails;
}
declare function unpackTransportMethods(result: PageResult): TransportMethod[];
declare function unpackServicePointHeaders(result: PageResult): ServicePointHeader[];

declare const DEFAULT_PAGE_LAYOUT_LOGO_SRC = "https://orderly.shop/home/App_Icon.svg";
declare const pageLayoutSlots: readonly ["utility", "header", "header-actions", "primary-nav", "left", "right", "content-before", "content", "content-after", "footer", "overlay"];
type PageLayoutSlot = typeof pageLayoutSlots[number];
interface PageLayoutConfig {
    template?: HTMLTemplateElement | string;
    logoSrc?: string;
    logoAlt?: string;
    logoHref?: string;
    primaryNavPlacement?: PageLayoutPrimaryNavPlacement;
    primaryNavDesktopPlacement?: PageLayoutPrimaryNavPlacement;
    primaryNavMobilePlacement?: PageLayoutPrimaryNavPlacement;
}
type PageLayoutPrimaryNavPlacement = "primary-nav" | "header" | "left" | "right";
declare function configurePageLayout(config: PageLayoutConfig): void;
declare class OrderlyPageLayoutElement extends HTMLElement {
    static observedAttributes: string[];
    private disconnectResponsiveTemplates?;
    private lastResponsiveTemplateSignature;
    get logoSrc(): string;
    set logoSrc(value: string);
    get logoAlt(): string;
    set logoAlt(value: string);
    get logoHref(): string;
    set logoHref(value: string);
    get primaryNavPlacement(): PageLayoutPrimaryNavPlacement;
    set primaryNavPlacement(value: PageLayoutPrimaryNavPlacement);
    get primaryNavDesktopPlacement(): PageLayoutPrimaryNavPlacement;
    set primaryNavDesktopPlacement(value: PageLayoutPrimaryNavPlacement);
    get primaryNavMobilePlacement(): PageLayoutPrimaryNavPlacement;
    set primaryNavMobilePlacement(value: PageLayoutPrimaryNavPlacement);
    connectedCallback(): void;
    disconnectedCallback(): void;
    attributeChangedCallback(): void;
    render(): void;
    private renderAndSyncResponsiveSignature;
    private effectivePrimaryNavPlacement;
    private currentResponsiveSignature;
}

type UiLanguage = "DA" | "EN";
type UiTextKey = "addressTitle" | "basketCheckoutDisabledLabel" | "basketCheckoutLabel" | "basketEmptyLabel" | "basketErrorsTitle" | "basketLineErrorFallback" | "basketLabel" | "basketPanelTitle" | "categoriesLabel" | "categoryConfigurationErrorTitle" | "categoryNoConfigured" | "categoryNoDefinitions" | "categoryNoSlugMatch" | "categoryNoUrlMatch" | "checkoutAddressTitle" | "checkoutCityLabel" | "checkoutCompanyLabel" | "checkoutCountryLabel" | "checkoutCustomerTitle" | "checkoutChooseServicePointLabel" | "checkoutDeliveryMethodLabel" | "checkoutDeliveryAddressPrompt" | "checkoutDeliveryTitle" | "checkoutEmailLabel" | "checkoutErrorLabel" | "checkoutInvalidEmailLabel" | "checkoutInvalidPhoneLabel" | "checkoutFirstNameLabel" | "checkoutFormTitle" | "checkoutLastNameLabel" | "checkoutOrderTitle" | "checkoutNoDeliveryMethodsLabel" | "checkoutNoServicePointsLabel" | "checkoutPageDescription" | "checkoutPageTitle" | "checkoutPhoneCountryLabel" | "checkoutPhoneLabel" | "checkoutServicePointsErrorLabel" | "checkoutServicePointLabel" | "checkoutServicePointHelpLabel" | "checkoutStreet2Label" | "checkoutStreetLabel" | "checkoutSubmitLabel" | "checkoutSubmittingLabel" | "checkoutTermsLabel" | "checkoutTermsLinkLabel" | "checkoutZipLabel" | "clearBasketLabel" | "clearSearchLabel" | "closeLabel" | "closeMenuLabel" | "collapseLabel" | "contactTitle" | "continueShoppingLabel" | "deliveryFallbackLabel" | "deliveryNote" | "emailLabel" | "emptyLabel" | "expandLabel" | "homeRailCtaLabel" | "homeTitle" | "informationLinksTitle" | "itemFallbackTitle" | "loadMoreLabel" | "loadingLabel" | "mainCategoriesLabel" | "mainNavigationLabel" | "menuLabel" | "navigationItemFallbackLabel" | "openingHoursTitle" | "phoneLabel" | "productAddLabel" | "productInBasketLabel" | "productDetailBrandLabel" | "productDetailColorLabel" | "productDetailConditionLabel" | "productDetailSizeLabel" | "productErrorLabel" | "productFallbackTitle" | "productImageLabel" | "productImageOverlayLabel" | "productImageThumbnailsLabel" | "productLoadingLabel" | "productNotFoundLabel" | "productOpenImageLabel" | "productOpenPageLabel" | "productZoomInLabel" | "productZoomOutLabel" | "productZoomResetLabel" | "productRemoveLabel" | "productViewLabel" | "productViewWithTitle" | "productsLabel" | "productsLoadError" | "quantityLabel" | "quantityShortLabel" | "removeLabel" | "searchLabel" | "searchPlaceholder" | "searchPromptLabel" | "searchingLabel" | "servicePointFallbackLabel" | "shippingLabel" | "shopBrandLabel" | "shopNowLabel" | "sortLabel" | "subtotalLabel" | "totalLabel" | "totalNote" | "websiteLabel";
declare function defaultUiLanguage(): UiLanguage;
declare function configureUiLanguage(language: UiLanguage | string | undefined): UiLanguage;
declare function normalizeUiLanguage(language: UiLanguage | string | undefined): UiLanguage;
declare function uiText(key: UiTextKey, language?: UiLanguage): string;
declare function formatUiText(key: UiTextKey, values: Record<string, string | number | undefined>, language?: UiLanguage): string;

declare const DEFAULT_SHOP_BASE_URL = "https://service.orderly.shop";
declare const DEFAULT_SHOP_BRAND_LABEL: string;
declare const DEFAULT_SHOP_SORT_OPTIONS: SortOption[];
declare const DEFAULT_SHOP_NAVIGATION_DEFINITIONS: NavigationDefinition[];
declare const DEFAULT_SHOP_CATEGORY_DEFINITIONS: NavigationDefinition[];
interface BasketLabels {
    emptyLabel?: string;
    clearLabel?: string;
    continueLabel?: string;
    quantityLabel?: string;
    removeLabel?: string;
    subtotalLabel?: string;
    shippingLabel?: string;
    totalLabel?: string;
    totalNote?: string;
    deliveryNote?: string;
}
type DefaultShopPageKind = "home" | "category" | "product" | "checkout" | "payment";
interface DefaultShopNavigationLayout {
    primaryNavPlacement?: PageLayoutPrimaryNavPlacement;
    primaryNavDesktopPlacement?: PageLayoutPrimaryNavPlacement;
    primaryNavMobilePlacement?: PageLayoutPrimaryNavPlacement;
    layout?: NavigationLayout;
    layoutDesktop?: NavigationLayout;
    layoutMobile?: NavigationLayout;
    persistState?: boolean;
    stateKey?: string;
}
interface ProductDetailTrustNote {
    title?: string;
    text?: string;
}
interface ProductDetailSecondaryCta {
    label?: string;
    href?: string;
    target?: string;
}
interface ProductDetailConfig {
    trustNote?: ProductDetailTrustNote;
    secondaryCta?: ProductDetailSecondaryCta;
}
interface LegalOwnershipConfig {
    ownerName?: string;
    ownerCvr?: string;
}
interface DefaultShopConfig {
    uiLanguage?: UiLanguage | string;
    baseUrl?: string;
    brandLabel?: string;
    legalOwnerName?: string;
    legalOwnerCvr?: string;
    homeHref?: string;
    productHref?: string;
    productUrlMode?: StorefrontProductUrlMode;
    productPathRoot?: string;
    productPathBuilder?: StorefrontProductRouteConfig["buildPath"];
    productPathParser?: StorefrontProductRouteConfig["parsePath"];
    checkoutHref?: string;
    checkoutLabel?: string;
    checkoutPageTitle?: string;
    checkoutPageDescription?: string;
    checkoutOrderTitle?: string;
    checkoutTermsHref?: string;
    checkoutLabels?: CheckoutLabels;
    basketLabels?: BasketLabels;
    basketMode?: BasketDisplayMode;
    productDetail?: ProductDetailConfig;
    searchPlaceholder?: string;
    emptyLabel?: string;
    /**
     * User-facing navigation/category structure for default storefront pages.
     */
    navigationDefinitions?: NavigationDefinition[];
    /**
     * Backward-compatible alias for navigationDefinitions.
     */
    categoryDefinitions?: NavigationDefinition[];
    categoryPageRoot?: string;
    categoryUrlMode?: CategoryUrlMode;
    /**
     * Core SearchQuery merged into every default storefront search.
     *
     * Use this for shop-wide scope such as tenant/account filters, published-only
     * filters, inventory constraints, or other hidden search restrictions. It is
     * intentionally a generic SearchQuery and not account-id specific.
     */
    defaultQuery?: SearchQuery;
    /**
     * Backward-compatible alias for defaultQuery.
     */
    query?: SearchQuery;
    sortOptions?: SortOption[];
    /**
     * Layout defaults used by the package-owned home, category, product,
     * checkout, and payment pages when they compose page-layout and navigation.
     */
    navigationLayout?: DefaultShopNavigationLayout;
}
declare function configureDefaultShop(config?: DefaultShopConfig): void;
declare function resetDefaultShop(): void;
declare function defaultShopUiLanguage(): UiLanguage;
declare function defaultShopBaseUrl(): string;
declare function defaultShopBrandLabel(): string;
declare function defaultShopLegalOwnership(): LegalOwnershipConfig;
declare function defaultShopHomeHref(): string;
declare function defaultShopProductHref(): string;
declare function defaultShopProductUrlMode(): StorefrontProductUrlMode;
declare function defaultShopProductPathRoot(): string;
declare function defaultShopProductHrefForShareUrl(shareUrl: string): string;
declare function defaultShopProductShareUrlFromUrl(url?: string | URL | Location): string | undefined;
declare function defaultShopCheckoutHref(): string;
declare function defaultShopCheckoutLabel(): string;
declare function defaultShopCheckoutPageTitle(): string;
declare function defaultShopCheckoutPageDescription(): string;
declare function defaultShopCheckoutOrderTitle(): string;
declare function defaultShopCheckoutTermsHref(): string;
declare function defaultShopCheckoutLabels(): CheckoutLabels;
declare function defaultShopBasketLabels(): BasketLabels;
declare function defaultShopBasketMode(): BasketDisplayMode;
declare function defaultShopProductDetail(): ProductDetailConfig;
declare function defaultShopNavigationLayout(page: DefaultShopPageKind): DefaultShopNavigationLayout;
declare function defaultShopSearchPlaceholder(): string;
declare function defaultShopEmptyLabel(): string;
declare function defaultShopSortOptions(): SortOption[];
declare function defaultShopSearchQuery(): SearchQuery | undefined;
declare function defaultShopNavigationItems(url?: string | URL | Location): ResolvedNavigationItem[];
declare function defaultShopNavigationError(): string | undefined;

export { defaultShopSearchQuery as $, defaultShopCheckoutHref as A, BasketController as B, type CheckoutLabels as C, type DefaultShopConfig as D, defaultShopCheckoutLabel as E, defaultShopCheckoutLabels as F, defaultShopCheckoutOrderTitle as G, defaultShopCheckoutPageDescription as H, defaultShopCheckoutPageTitle as I, defaultShopCheckoutTermsHref as J, defaultShopEmptyLabel as K, type LegalOwnershipConfig as L, defaultShopHomeHref as M, defaultShopLegalOwnership as N, OrderlyElement as O, type PageLayoutConfig as P, defaultShopNavigationError as Q, defaultShopNavigationItems as R, defaultShopNavigationLayout as S, defaultShopProductDetail as T, type UiLanguage as U, defaultShopProductHref as V, defaultShopProductHrefForShareUrl as W, defaultShopProductPathRoot as X, defaultShopProductShareUrlFromUrl as Y, defaultShopProductUrlMode as Z, defaultShopSearchPlaceholder as _, type DefaultShopNavigationLayout as a, defaultShopSortOptions as a0, defaultShopUiLanguage as a1, defaultUiLanguage as a2, dispatchBasketDraftEvent as a3, draftOrderItemCount as a4, formatUiText as a5, normalizeUiLanguage as a6, productToDraftLine as a7, resetDefaultShop as a8, uiText as a9, unpackServicePointHeaders as aa, unpackTransportMethods as ab, type BasketLabels as b, DEFAULT_PAGE_LAYOUT_LOGO_SRC as c, DEFAULT_SHOP_BASE_URL as d, DEFAULT_SHOP_BRAND_LABEL as e, DEFAULT_SHOP_CATEGORY_DEFINITIONS as f, DEFAULT_SHOP_NAVIGATION_DEFINITIONS as g, DEFAULT_SHOP_SORT_OPTIONS as h, type DefaultShopPageKind as i, OrderlyCheckoutElement as j, OrderlyPageLayoutElement as k, type PageLayoutPrimaryNavPlacement as l, type PageLayoutSlot as m, type ProductDetailConfig as n, type ProductDetailSecondaryCta as o, type ProductDetailTrustNote as p, type UiTextKey as q, configureDefaultShop as r, configurePageLayout as s, configureUiLanguage as t, createBasketController as u, defaultBasketController as v, defaultShopBaseUrl as w, defaultShopBasketLabels as x, defaultShopBasketMode as y, defaultShopBrandLabel as z };
