-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
49 lines (43 loc) · 994 Bytes
/
types.ts
File metadata and controls
49 lines (43 loc) · 994 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/**
* @license
* SPDX-License-Identifier: Apache-2.0
*/
import React from 'react';
export interface Product {
id: string;
name: string;
tagline: string;
description: string;
longDescription?: string;
price: number;
category: 'Quarto' | 'Vestuário' | 'Passeio' | 'Higiene' | 'Acessórios' | 'Brinquedos';
imageUrl: string;
gallery?: string[];
features: string[];
}
export interface JournalArticle {
id: number;
title: string;
date: string;
excerpt: string;
image: string;
content: React.ReactNode; // Allowing JSX for rich formatting/poems
}
export interface ChatMessage {
role: 'user' | 'model';
text: string;
timestamp: number;
imageUrl?: string;
}
export enum LoadingState {
IDLE = 'IDLE',
LOADING = 'LOADING',
ERROR = 'ERROR',
SUCCESS = 'SUCCESS'
}
export type ViewState =
| { type: 'home' }
| { type: 'product', product: Product }
| { type: 'journal', article: JournalArticle }
| { type: 'checkout' }
| { type: 'admin' };