UNPKG

@salla.sa/twilight-components

Version:
19 lines (18 loc) 815 B
/** * Bullet delivery intent helpers. * Reads/writes the same storage key as salla-bullet-delivery so both components stay in sync. */ import type { BulletDeliveryResult } from '../salla-bullet-delivery/interfaces'; import type { SelectedOption } from './interfaces'; export declare function getStoredIntent(): BulletDeliveryResult | null; export interface ResolvedIntent { type: 'address' | 'branch'; option: SelectedOption; } /** Resolve the stored intent into a city or branch selection. Returns null when no usable intent. */ export declare function resolveIntent(): ResolvedIntent | null; /** Build the payload for opening the bullet delivery modal with preselection. */ export declare function buildBulletOpenPayload(): { preselected_address_id?: number; preselected_branch_id?: number; };