euv_ui/component/attachment/view/enum.rs
1use super::*;
2
3/// How far along an attachment is.
4///
5/// The reference publishes five: the empty slot that waits for a file,
6/// the upload that is running, the processing that follows it, the
7/// failure, and the finished file.
8#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
9pub enum EuvAttachmentState {
10 /// The slot is waiting for a file.
11 Idle,
12 /// The file is being uploaded.
13 Uploading,
14 /// The file is being processed.
15 Processing,
16 /// The upload failed.
17 Error,
18 /// The file is ready.
19 #[default]
20 Done,
21}
22
23/// The size of an attachment.
24///
25/// The reference publishes three: the default chip, the small one and the
26/// extra small one, whose thumbnail is one step under the small one.
27#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
28pub enum EuvAttachmentSize {
29 /// The chip stands at the default size.
30 #[default]
31 Default,
32 /// The chip stands at the small size.
33 Sm,
34 /// The chip stands at the extra small size.
35 Xs,
36}
37
38/// The direction the parts of an attachment are laid out in.
39#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
40pub enum EuvAttachmentOrientation {
41 /// The thumbnail sits beside the text.
42 #[default]
43 Horizontal,
44 /// The thumbnail sits above the text.
45 Vertical,
46}
47
48/// The kind of media an attachment leads with.
49///
50/// The reference publishes two: the icon that stands for a file, and the
51/// thumbnail of an image.
52#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
53pub enum EuvAttachmentMediaVariant {
54 /// The media is an icon standing for the file.
55 #[default]
56 Icon,
57 /// The media is the thumbnail of an image.
58 Image,
59}