///
///
import type { FilterState, SharedStateConfig, SharedStateEvents } from "../types";
/**
* Composable для управления общим состоянием между виджетами
*
* Этот composable предоставляет централизованное хранилище для обмена данными
* между searchWidget, filtersWidget, productsWidget и sortWidget
*/
export declare function useSharedState(config?: SharedStateConfig): {
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: FilterState) => void;
removeFilter: (filterId: string) => void;
setActiveFilters: (filters: 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: SharedStateEvents) => void;
unregisterEvents: () => void;
};
//# sourceMappingURL=useSharedState.d.ts.map