@salla.sa/twilight-components
Version:
Salla Web Component
68 lines (67 loc) • 2.4 kB
TypeScript
import { LoyaltyProgram, Point } from './interfaces';
export declare function nearestLowerMultiple(number: number, multipleOf?: number): number;
export declare function closeModals(cb?: () => void): void;
export declare function normalizeLoyaltyData(data: LoyaltyProgram): {
prizes: {
items: {
group_title: string;
group_type: string;
id?: number;
name?: string;
description?: string;
url?: null;
image?: string;
cost_points?: number;
prize_url?: null;
coupon_type?: null;
coupon_amount?: string;
coupon_maximum_amount?: string;
included_category_ids?: number[];
included_brand_ids?: number[];
included_product_ids?: number[];
excluded_category_ids?: number[];
excluded_brand_ids?: number[];
excluded_product_ids?: number[];
order_minimum_amount?: string;
product_id?: null;
use_product_image?: number;
free_shipping_maximum_amount?: string;
free_shipping_terms_apply?: boolean;
status?: number;
key?: string;
is_product_available?: boolean;
categories?: any[];
excludedCategories?: any[];
brands?: any[];
excludedBrands?: any[];
products?: any[];
excludedProducts?: any[];
}[];
type?: string;
title?: string;
}[];
prizes_count: number;
points: Point[];
loyalty_program_id?: number;
name?: string;
description?: string;
image?: string;
customer?: import("./interfaces").Customer;
promotion_title?: string;
promotion_description?: string;
prize_promotion_title?: string;
prize_promotion_description?: string;
status?: boolean;
points_validity_by?: null;
points_validity_value?: null;
prize_promotion_logo?: string;
id?: number;
};
export declare function brand_path(brand: any): string;
export type TrackedPromiseState<T = any, K extends any[] = any> = ((...args: K) => Promise<T>) & {
status: 'idle' | 'pending' | 'success' | 'error';
data: undefined | T;
error: any;
};
export declare function isUnitOrder(point: Point): boolean;
export declare function formattedPointsJsx(value: Point | number): any;