from ableton.v2.control_surface import Skin

from . import colors
from .color import Color, FX

class Colors:
	"The color scheme of the Exquis. You can change the colors here, looking at `colors.png` for reference."
	
	class Device:
		class Bank:
			Selected = Color(45)
			NotSelected = Color(45, FX.darker(90))
			NoItem = Color(0)
		class ItemNavigation:
			ItemSelected = Color(45)
			ItemNotSelected = Color(45, FX.darker(90))
			NoItem = Color(0)
	class ItemNavigation:
		ItemSelected = Color(3)
		ItemNotSelected = Color(2)
		NoItem = Color(0)
	class DefaultButton:
		On = Color(colors.white)
		Off = Color(colors.off)
		Disabled = Color(0)
	class Transport:
		RecOn = Color(57, FX.pulsate)
		RecOff = Color(1)
		PlayOn = Color(98, FX.pulsate)
		PlayOff = Color(1)
		StopOn = Color(12)
		StopOff = Color(0)
		LoopOn = Color(colors.yellow)
		LoopOff = Color(14)
		BTAOn = Color(15)
		BTAOff = Color(0)
		MetronomeOn = Color(80)
		MetronomeOff = Color(81)
		TapTempo = Color(1)
		PunchOn = Color(80)
		PunchOff = Color(0)
	class Recording:
		On = Color(127)
		Off = Color(116)
	class Session:
		class Overview:
			Empty = Color(0)
			Stopped = Color(1)
			Playing = Color(3, FX.pulsate)
			Selected = Color(2)
		RecordButton = Color(6, FX.darker(60))
		ClipTriggeredPlay = Color(127)
		ClipTriggeredRecord = Color(60, FX.pulsate)
		ClipStarted = Color(80)
		ClipRecording = Color(50)
		ClipStopped = Color(1)
		Scene = Color(16, FX.darker(50))
		SceneTriggered = Color(16, FX.pulsate)
		SceneSelected = Color(16)
		NoScene = Color(0)
		StopClipTriggered = Color(21, FX.pulsate_white)
		StopClip = Color(3, FX.darker(50))
		StopClipDisabled = Color(3, FX.darker(50))
		ClipEmpty = Color(1, FX.darker(50))
		Navigation = Color(colors.white)
		Select = Color(23, FX.darker(50))
		SelectPressed = Color(colors.white)
		Shift = Color(23)
		ShiftPressed = Color(123)
		Delete = Color(95, FX.darker(95))
		DeletePressed = Color(colors.white)
		Duplicate = Color(1, FX.darker(50))
		DuplicatePressed = Color(3)
		NewTrack = Color(53, FX.darker(95))
		NewScene = Scene
	class ChannelStrip:
		class Track:
			ArmedOn = Color(5)
			ArmedOff = Color(6)
		class NoteMonitor:
			Armed = Color(5, FX.pulsate_green)
	class Mixer:
		ArmOn = Color(0)
		ArmOff = Color(127)
		SoloOff = Color(41, FX.darker(50))
		SoloOn = Color(40)
		MuteOff = Color(14)
		MuteOn = Color(colors.yellow)
		TrackSelected = Color(colors.white)
		TrackUnselected = Color(colors.light_white)
	
def make_skin():
	s = Skin(Colors)
	return s
