///
///
import type { SearchApiService } from "../../searchWidget/types";
import type { SharedStateConfig } from "../types";
export declare function useSearchStateManager(apiService: SearchApiService | undefined, config?: SharedStateConfig): {
performSearchWithFilters: (query: string, options?: {
filters?: Record;
products?: Array<{
code: string;
value_ids?: string[];
value_gte?: string;
value_lte?: string;
}>;
activeFilters?: Array<{
id: string;
name: string;
code: string;
values: Array<{
id: string;
name: string;
isSelected: boolean;
}>;
}>;
pagination?: {
limit_products?: number;
limit_categories?: number;
limit_brands?: number;
offset_products?: number;
};
sort?: string;
updateSharedState?: boolean;
}) => Promise | null | undefined>;
performDeepSearch: (query: string) => Promise | null | undefined>;
performQuickSearch: (query: string) => Promise<{
results: import("../../searchWidget/types").FullProduct[];
hints: {
word: string;
hint: string;
}[];
fullHints: string[];
} | undefined>;
searchState: {
readonly query: string;
readonly results: readonly {
readonly description?: string | undefined;
readonly category?: {
readonly id: string;
readonly name: string;
} | null | undefined;
readonly classification_properties?: readonly {
readonly id: string;
readonly name: string;
readonly value: {
readonly id: string;
readonly name: string;
};
}[] | undefined;
readonly id: string;
readonly name: string;
readonly vendor_code: string;
readonly picture: string | null;
readonly price: number;
readonly url: string | null;
readonly properties: readonly {
readonly name: string;
readonly values: readonly {
readonly value: string;
}[];
}[];
}[];
readonly totalResults: number;
readonly full_products: readonly {
readonly description?: string | undefined;
readonly category?: {
readonly id: string;
readonly name: string;
} | null | undefined;
readonly classification_properties?: readonly {
readonly id: string;
readonly name: string;
readonly value: {
readonly id: string;
readonly name: string;
};
}[] | undefined;
readonly id: string;
readonly name: string;
readonly vendor_code: string;
readonly picture: string | null;
readonly price: number;
readonly url: string | null;
readonly properties: readonly {
readonly name: string;
readonly values: readonly {
readonly value: string;
}[];
}[];
}[];
readonly totalProducts: number;
readonly filters: readonly any[];
readonly activeFilters: readonly {
readonly id: string;
readonly name: string;
readonly code: string;
readonly values: readonly {
readonly id: string;
readonly name: string;
readonly isSelected: boolean;
}[];
}[];
readonly products: readonly {
readonly code: string;
readonly value_ids?: readonly string[] | undefined;
readonly value_gte?: string | undefined;
readonly value_lte?: string | undefined;
}[];
readonly activeProducts: readonly {
readonly code: string;
readonly value_ids?: readonly string[] | undefined;
readonly value_gte?: string | undefined;
readonly value_lte?: string | undefined;
}[];
readonly sort: string;
readonly pagination: {
readonly limit_products: number;
readonly limit_categories: number;
readonly limit_brands: number;
readonly offset_products: number;
};
readonly isLoading: boolean;
readonly error: string | null;
readonly searchTimestamp: number;
readonly isDeepSearch: boolean;
};
hasResults: import("vue").ComputedRef;
hasActiveFilters: import("vue").ComputedRef;
isEmpty: import("vue").ComputedRef;
setSearchResults: (query: string, results: any[], isDeepSearch?: boolean, fullProducts?: any[] | undefined, totalProducts?: number | undefined) => void;
setFilters: (filters: any[]) => void;
setLoading: (loading: boolean) => void;
setError: (error: string) => void;
applyFilter: (filter: import("../types").FilterState) => void;
removeFilter: (filterId: string) => void;
setActiveFilters: (filters: import("../types").FilterState[]) => void;
clearFilters: () => void;
setProducts: (products: any[]) => void;
clearProducts: () => void;
setActiveProducts: (activeProducts: any[]) => void;
clearActiveProducts: () => void;
updateProducts: (products: any[]) => void;
selectProduct: (product: any) => void;
reset: () => void;
setSort: (sort: string) => void;
setPagination: (pagination: {
limit_products?: number | undefined;
limit_categories?: number | undefined;
limit_brands?: number | undefined;
offset_products?: number | undefined;
}) => void;
resetPagination: () => void;
registerEvents: (eventHandlers: import("../types").SharedStateEvents) => void;
unregisterEvents: () => void;
};
//# sourceMappingURL=useSearchStateManager.d.ts.map