1 | import { ReactNode } from 'react';
|
2 | import { Price } from '@jetshop/core/types';
|
3 | export interface UsePrice {
|
4 | price: Price;
|
5 | previousPrice?: Price;
|
6 | currencyOverride?: {
|
7 | code: string;
|
8 | culture: string;
|
9 | };
|
10 |
|
11 | formatter?(price: number, currencyCode?: string, culture?: string): string;
|
12 |
|
13 | includeVat?: boolean;
|
14 | }
|
15 | export declare function usePrice({ currencyOverride, price, previousPrice, includeVat, formatter: defaultFormatter }: UsePrice): {
|
16 | hasDiscount: boolean;
|
17 | includesVat: boolean;
|
18 | currencyLocale: {
|
19 | code: string;
|
20 | culture: string;
|
21 | };
|
22 | pricing: {
|
23 | [k: string]: {
|
24 | vat: number;
|
25 | value: number;
|
26 | };
|
27 | };
|
28 | formattedPricing: {
|
29 | previousPrice: ReactNode;
|
30 | price: ReactNode;
|
31 | };
|
32 | };
|
33 |
|
34 |
|
35 |
|
36 | export declare function selectPriceType(includeVat: boolean, priceObj: Price): {
|
37 | vat: number;
|
38 | value: number;
|
39 | } | null;
|