import type { ProductStock } from "../types"; /** * Result of stock validation */ export interface StockValidationResult { isValid: boolean; isAvailable: boolean; availableStock: number; requestedQuantity: number; errorMessage?: string; } /** * Stock status information */ export interface StockStatusInfo { status: 'available' | 'low' | 'out-of-stock'; message: string; availableQuantity: number; } /** * Validates if requested quantity is available in stock * @param stock ProductStock object * @param requestedQuantity Quantity being requested * @param locationSlug Optional location to check stock for * @returns Validation result with availability info */ export declare function validateStockAvailability(stock: ProductStock, requestedQuantity: number, locationSlug?: string): StockValidationResult; /** * Gets user-friendly stock status message * @param availableStock Available stock quantity * @param lowStockThreshold Threshold for low stock warning * @returns Stock status information */ export declare function getStockStatusInfo(availableStock: number, lowStockThreshold?: number): StockStatusInfo; /** * Checks if stock checking should be enabled for a product * @param productId Product ID to check * @param stock Stock data (may be null during loading) * @param enableStockCheck User preference for stock checking * @returns Whether stock validation should be performed */ export declare function shouldPerformStockCheck(productId: string, stock: ProductStock | null, enableStockCheck: boolean): boolean; /** * Validates quantity input from user * @param quantity User input quantity * @returns Validation result with parsed quantity */ export declare function validateQuantityInput(quantity: any): { isValid: boolean; quantity: number; errorMessage?: string; };