use std::sync::Arc;

use idmap_derive::IntegerId;
use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, Copy, PartialEq, Eq, IntegerId, Serialize, Deserialize)]
pub enum ToastTopic {
	System,
	Error,
	DesktopNotification,
	XSNotification,
	IpdChange,
}

#[derive(Debug, Clone, Copy, Serialize, Deserialize)]
pub enum ToastDisplayMethod {
	Hide,
	Center,
	Watch,
}

#[derive(Debug, Clone, Copy, IntegerId, PartialEq)]
pub enum BackendAttrib {
	Stereo,
	StereoFullFrame,
	MouseTransform,
	Icon,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub enum BackendAttribValue {
	Stereo(StereoMode),
	StereoFullFrame(bool),
	MouseTransform(MouseTransform),
	#[serde(skip_serializing, skip_deserializing)]
	Icon(Arc<str>),
}

#[derive(Default, Debug, Clone, Copy, Serialize, Deserialize, PartialEq)]
pub enum StereoMode {
	#[default]
	None,
	LeftRight,
	RightLeft,
	TopBottom,
	BottomTop,
}

#[derive(Default, Debug, Clone, Copy, Serialize, Deserialize)]
pub enum MouseTransform {
	#[default]
	Default,
	Normal,
	Rotated90,
	Rotated180,
	Rotated270,
	Flipped,
	Flipped90,
	Flipped180,
	Flipped270,
}
