/**
 * Shared Types for Query Suggestions Components
 *
 * Data-agnostic types that allow clients to map their own field names
 */
import type { ReactNode, CSSProperties } from 'react';
/** Maps client's data fields to component expected fields */
export interface SuggestionFieldMapping {
    /** Field path for suggestion text (e.g., "query", "searchTerm", "text") */
    query: string;
    /** Field path for suggestion count/popularity */
    count?: string;
    /** Field path for object ID */
    id?: string;
    /** Field path for categories array */
    categories?: string;
    /** Field path for highlighted text */
    highlighted?: string;
    /** Custom field mappings */
    custom?: Record<string, string>;
}
/** Maps client's product fields to component expected fields */
export interface ProductFieldMapping {
    /** Field path for product ID */
    id: string;
    /** Field path for product title/name */
    title: string;
    /** Field path for product image URL */
    image?: string;
    /** Field path for product price */
    price?: string;
    /** Field path for original/compare price */
    comparePrice?: string;
    /** Field path for product URL */
    url?: string;
    /** Field path for brand name */
    brand?: string;
    /** Field path for category */
    category?: string;
    /** Field path for rating */
    rating?: string;
    /** Field path for review count */
    reviewCount?: string;
    /** Field path for discount percentage */
    discount?: string;
    /** Field path for availability/in stock */
    inStock?: string;
    /** Field path for currency */
    currency?: string;
    /** Field path for multiple images */
    images?: string;
    /** Field path for original/compare price (alias) */
    originalPrice?: string;
    /** Field path for availability */
    available?: string;
    /** Field path for product options (Color, Size axes) */
    options?: string;
    /** Field path for product variants */
    variants?: string;
    /** Field path for product tags */
    tags?: string;
    /** Custom field mappings */
    custom?: Record<string, string>;
}
/** Maps client's category/tab fields */
export interface CategoryFieldMapping {
    id: string;
    label: string;
    count?: string;
    icon?: string;
    image?: string;
}
/** Maps client's brand fields */
export interface BrandFieldMapping {
    id?: string;
    name: string;
    logo?: string;
    count?: string;
}
export type DropdownLayout = 'list' | 'two-column' | 'three-column' | 'grid' | 'hero' | 'full-width' | 'mobile-sheet' | 'overlay';
export type ProductCardSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
export type ProductCardStyle = 'minimal' | 'standard' | 'detailed' | 'compact' | 'horizontal';
/** Available dropdown variants */
export type SuggestionDropdownVariant = 'amazon' | 'google' | 'pinterest' | 'spotlight' | 'shopify' | 'mobile-sheet' | 'minimal';
export interface VisualConfig {
    /** Overall dropdown layout */
    layout?: DropdownLayout;
    /** Show/hide shadows */
    shadows?: boolean;
    /** Border radius (px or CSS value) */
    borderRadius?: number | string;
    /** Animation style */
    animation?: 'none' | 'fade' | 'slide' | 'scale' | 'spring';
    /** Animation duration in ms */
    animationDuration?: number;
    /** Blur background when open */
    backdropBlur?: boolean;
    /** Show dividers between sections */
    showDividers?: boolean;
    /** Compact mode (reduced padding) */
    compact?: boolean;
}
export type SectionType = 'suggestions' | 'recent' | 'trending' | 'products' | 'categories' | 'brands' | 'collections' | 'pages' | 'custom';
export interface SectionConfig {
    /** Section identifier */
    id: SectionType | string;
    /** Section title (can be ReactNode for custom rendering) */
    title?: string | ReactNode;
    /** Whether section is enabled */
    enabled?: boolean;
    /** Maximum items to show */
    maxItems?: number;
    /** Section display order (lower = higher) */
    order?: number;
    /** Section-specific layout override */
    layout?: 'list' | 'grid' | 'horizontal-scroll' | 'chips';
    /** Number of columns for grid layout */
    columns?: number;
    /** Show "View All" link */
    showViewAll?: boolean;
    /** View All link URL or handler */
    viewAllLink?: string;
    /** Custom CSS class */
    className?: string;
    /** Custom styles */
    style?: CSSProperties;
    /** Custom renderer for entire section */
    render?: (data: any[], config: SectionConfig) => ReactNode;
    /** Custom renderer for individual items */
    renderItem?: (item: any, index: number) => ReactNode;
    /** Empty state message */
    emptyMessage?: string;
    /** Icon for section header */
    icon?: ReactNode;
}
export interface ProductDisplayConfig {
    /** Card size */
    size?: ProductCardSize;
    /** Card style */
    style?: ProductCardStyle;
    /** Show product image */
    showImage?: boolean;
    /** Image aspect ratio */
    imageAspectRatio?: '1:1' | '4:3' | '3:4' | '16:9' | 'auto';
    /** Image object-fit: 'cover' crops to fill (default), 'contain' fits entire image */
    imageObjectFit?: 'cover' | 'contain';
    /** Show price */
    showPrice?: boolean;
    /** Show compare/original price */
    showComparePrice?: boolean;
    /** Show discount badge */
    showDiscount?: boolean;
    /** Show brand */
    showBrand?: boolean;
    /** Show rating */
    showRating?: boolean;
    /** Show stock status */
    showStock?: boolean;
    /** Show add to cart button */
    showAddToCart?: boolean;
    /** Currency symbol */
    currency?: string;
    /** Currency position */
    currencyPosition?: 'before' | 'after';
    /** Decimal places for price */
    priceDecimals?: number;
    /** Truncate title after N lines */
    titleLines?: number;
    /** Hover effect */
    hoverEffect?: 'none' | 'lift' | 'glow' | 'scale' | 'border';
    /** Image placeholder */
    imagePlaceholder?: ReactNode;
    /** Lazy load images */
    lazyLoadImages?: boolean;
    /** Show variant swatches on card */
    showVariants?: boolean;
    /** Which option names to show as swatches (e.g., ['Color']). Default: all */
    variantOptionsToShow?: string[];
    /** Max variant values before "+N more" (default: 5) */
    maxVariantValues?: number;
    /** Show price range when variants have different prices */
    showPriceRange?: boolean;
    /** Show badges (sale, new, sold out, etc.) */
    showBadges?: boolean;
    /** Custom badge extractor from tags */
    badgeExtractor?: (tags?: string[], product?: any) => import('@seekora-ai/ui-sdk-types').ProductBadge[];
}
export interface SuggestionDisplayConfig {
    /** Show search icon */
    showIcon?: boolean;
    /** Custom icon */
    icon?: ReactNode;
    /** Show hit count */
    showCount?: boolean;
    /** Show categories inline */
    showCategories?: boolean;
    /** Max categories to show */
    maxCategories?: number;
    /** Highlight matching text */
    highlightMatches?: boolean;
    /** Highlight style */
    highlightStyle?: CSSProperties;
    /** Show arrow on hover */
    showArrow?: boolean;
    /** Category click behavior */
    categoryClickable?: boolean;
}
export interface DropdownThemeConfig {
    /** Light/dark mode */
    mode?: 'light' | 'dark' | 'auto';
    /** Primary brand color */
    primaryColor?: string;
    /** Background color */
    backgroundColor?: string;
    /** Surface color (cards, sections) */
    surfaceColor?: string;
    /** Text color */
    textColor?: string;
    /** Secondary text color */
    textSecondaryColor?: string;
    /** Border color */
    borderColor?: string;
    /** Hover background */
    hoverColor?: string;
    /** Highlight/match color */
    highlightColor?: string;
    /** Success color (in stock, etc.) */
    successColor?: string;
    /** Error color (out of stock, etc.) */
    errorColor?: string;
    /** Font family */
    fontFamily?: string;
    /** Base font size */
    fontSize?: number | string;
    /** Border radius */
    borderRadius?: number | string;
    /** Box shadow */
    boxShadow?: string;
    /** Custom CSS variables */
    cssVariables?: Record<string, string>;
}
export interface AnalyticsConfig {
    /** Enable analytics */
    enabled?: boolean;
    /** Track suggestion clicks */
    trackSuggestionClicks?: boolean;
    /** Track product clicks */
    trackProductClicks?: boolean;
    /** Track impressions */
    trackImpressions?: boolean;
    /** Impression debounce time (ms) */
    impressionDebounce?: number;
    /** Track category clicks */
    trackCategoryClicks?: boolean;
    /** Track brand clicks */
    trackBrandClicks?: boolean;
    /** Track search submissions */
    trackSearchSubmit?: boolean;
    /** Custom analytics tags */
    tags?: string[];
    /** User ID for personalization */
    userId?: string;
    /** Session ID */
    sessionId?: string;
    /** Custom event handler */
    onEvent?: (eventType: string, data: any) => void;
}
export interface DropdownEventHandlers<TSuggestion = any, TProduct = any, TCategory = any, TBrand = any> {
    /** Suggestion selected */
    onSuggestionSelect?: (suggestion: TSuggestion, index: number) => void;
    /** Product clicked */
    onProductClick?: (product: TProduct, index: number) => void;
    /** Category clicked */
    onCategoryClick?: (category: TCategory, suggestion?: TSuggestion) => void;
    /** Brand clicked */
    onBrandClick?: (brand: TBrand) => void;
    /** Tab/filter changed */
    onTabChange?: (tabId: string, tab?: any) => void;
    /** Recent search clicked */
    onRecentClick?: (query: string) => void;
    /** Recent search removed */
    onRecentRemove?: (query: string) => void;
    /** Clear all recent searches */
    onRecentClearAll?: () => void;
    /** View all clicked */
    onViewAll?: (section: SectionType | string) => void;
    /** Search submitted */
    onSearchSubmit?: (query: string) => void;
    /** Dropdown opened */
    onOpen?: () => void;
    /** Dropdown closed */
    onClose?: () => void;
    /** Keyboard navigation */
    onNavigate?: (direction: 'up' | 'down' | 'left' | 'right', index: number) => void;
    /** Add to cart clicked (if enabled) */
    onAddToCart?: (product: TProduct) => void;
}
export interface AccessibilityConfig {
    /** ARIA label for dropdown */
    ariaLabel?: string;
    /** ARIA labelledby */
    ariaLabelledBy?: string;
    /** Announce selection to screen readers */
    announceSelection?: boolean;
    /** Custom announcement text */
    getAnnouncementText?: (item: any, type: string) => string;
    /** Keyboard navigation enabled */
    keyboardNavigation?: boolean;
    /** Focus trap (keep focus within dropdown) */
    focusTrap?: boolean;
    /** Auto focus first item */
    autoFocus?: boolean;
    /** Close on escape */
    closeOnEscape?: boolean;
    /** Close on click outside */
    closeOnClickOutside?: boolean;
}
export interface BaseDropdownProps<TSuggestion = any, TProduct = any, TCategory = any, TBrand = any> extends DropdownEventHandlers<TSuggestion, TProduct, TCategory, TBrand> {
    /** Current search query */
    query: string;
    /** Whether dropdown is open/visible */
    isOpen?: boolean;
    /** Loading state */
    loading?: boolean;
    /** Error state */
    error?: Error | string | null;
    /** Suggestion items */
    suggestions?: TSuggestion[];
    /** Product items */
    products?: TProduct[];
    /** Category/filter tabs */
    categories?: TCategory[];
    /** Brand items */
    brands?: TBrand[];
    /** Recent searches (strings or objects) */
    recentSearches?: string[] | Array<{
        query: string;
        timestamp?: number;
    }>;
    /** Trending searches */
    trendingSearches?: string[] | TSuggestion[];
    /** Filtered tabs with products */
    filteredTabs?: Array<{
        id: string;
        label: string;
        products?: TProduct[];
        nb_hits?: number;
        filter?: string;
    }>;
    /** Currently active tab ID */
    activeTab?: string;
    /** Map suggestion data fields */
    suggestionFields?: SuggestionFieldMapping;
    /** Map product data fields */
    productFields?: ProductFieldMapping;
    /** Map category data fields */
    categoryFields?: CategoryFieldMapping;
    /** Map brand data fields */
    brandFields?: BrandFieldMapping;
    /** Section configurations */
    sections?: SectionConfig[];
    /** Product display config */
    productDisplay?: ProductDisplayConfig;
    /** Suggestion display config */
    suggestionDisplay?: SuggestionDisplayConfig;
    /** Visual/layout config */
    visual?: VisualConfig;
    /** Theme config */
    theme?: DropdownThemeConfig;
    /** Analytics config */
    analytics?: AnalyticsConfig;
    /** Accessibility config */
    accessibility?: AccessibilityConfig;
    /** Dropdown width */
    width?: string | number;
    /** Dropdown max height */
    maxHeight?: string | number;
    /** Dropdown min height */
    minHeight?: string | number;
    /** Z-index */
    zIndex?: number;
    /** Root CSS class */
    className?: string;
    /** Root inline styles */
    style?: CSSProperties;
    /** CSS classes for parts */
    classNames?: Partial<DropdownClassNames>;
    /** Inline styles for parts */
    styles?: Partial<DropdownStyles>;
    /** Custom header */
    header?: ReactNode;
    /** Custom footer */
    footer?: ReactNode;
    /** Custom empty state */
    renderEmpty?: (query: string) => ReactNode;
    /** Custom error state */
    renderError?: (error: Error | string) => ReactNode;
    /** Reference to input element (for focus management) */
    inputRef?: React.RefObject<HTMLInputElement>;
}
export interface DropdownClassNames {
    root: string;
    container: string;
    header: string;
    content: string;
    footer: string;
    section: string;
    sectionHeader: string;
    sectionTitle: string;
    sectionContent: string;
    sectionViewAll: string;
    suggestionsList: string;
    suggestionItem: string;
    suggestionItemActive: string;
    suggestionIcon: string;
    suggestionText: string;
    suggestionHighlight: string;
    suggestionCount: string;
    suggestionCategories: string;
    suggestionCategory: string;
    suggestionArrow: string;
    productsList: string;
    productCard: string;
    productCardHover: string;
    productImage: string;
    productImagePlaceholder: string;
    productInfo: string;
    productTitle: string;
    productBrand: string;
    productPrice: string;
    productComparePrice: string;
    productDiscount: string;
    productRating: string;
    productStock: string;
    productAddToCart: string;
    categoriesList: string;
    categoryItem: string;
    categoryItemActive: string;
    categoryIcon: string;
    categoryLabel: string;
    categoryCount: string;
    brandsList: string;
    brandItem: string;
    brandLogo: string;
    brandName: string;
    recentList: string;
    recentItem: string;
    recentIcon: string;
    recentText: string;
    recentRemove: string;
    recentClearAll: string;
    trendingList: string;
    trendingItem: string;
    trendingIcon: string;
    tabsList: string;
    tabItem: string;
    tabItemActive: string;
    tabCount: string;
    empty: string;
    emptyIcon: string;
    emptyText: string;
    error: string;
    errorIcon: string;
    errorText: string;
    keyboard: string;
    keyboardHint: string;
    keyboardKey: string;
}
export interface DropdownStyles {
    root: CSSProperties;
    container: CSSProperties;
    header: CSSProperties;
    content: CSSProperties;
    footer: CSSProperties;
    section: CSSProperties;
    suggestionItem: CSSProperties;
    productCard: CSSProperties;
    categoryItem: CSSProperties;
    brandItem: CSSProperties;
}
export interface DropdownRef {
    /** Get currently active/focused index */
    getActiveIndex: () => number;
    /** Set active index */
    setActiveIndex: (index: number) => void;
    /** Select currently active item */
    selectActive: () => void;
    /** Navigate to next item */
    navigateNext: () => void;
    /** Navigate to previous item */
    navigatePrevious: () => void;
    /** Focus the dropdown */
    focus: () => void;
    /** Close the dropdown */
    close: () => void;
    /** Get active tab ID (if tabs exist) */
    getActiveTab?: () => string | null;
    /** Set active tab */
    setActiveTab?: (tabId: string) => void;
    /** Scroll to item */
    scrollToItem?: (index: number) => void;
}
/** Extract field value from object using dot notation */
export type ExtractField<T, Path extends string> = Path extends `${infer First}.${infer Rest}` ? First extends keyof T ? ExtractField<T[First], Rest> : never : Path extends keyof T ? T[Path] : never;
/** Make specific keys required */
export type RequireKeys<T, K extends keyof T> = T & Required<Pick<T, K>>;
/** Deep partial type */
export type DeepPartial<T> = {
    [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
};
//# sourceMappingURL=types.d.ts.map