Files
shahikitchen-prod/domain/wishlist/entities.ts
T

22 lines
526 B
TypeScript

export interface WishlistItem {
id: string;
name: string;
price: number;
image?: string;
}
export type NewWishlistItem = WishlistItem;
export interface WishlistState {
items: WishlistItem[];
isOpen: boolean;
}
export type WishlistAction =
| { type: 'TOGGLE_ITEM'; payload: NewWishlistItem }
| { type: 'REMOVE_ITEM'; payload: string }
| { type: 'CLEAR_WISHLIST' }
| { type: 'TOGGLE_DRAWER' }
| { type: 'OPEN_DRAWER' }
| { type: 'CLOSE_DRAWER' }
| { type: 'RESTORE_ITEMS'; payload: WishlistItem[] };