import pygame

from Views.Sections.generalView import GeneralView
from config import *


class AutomationView(GeneralView):
    def __init__(self, evManager, index):
        self.name = "AutomationView"
        super().__init__(evManager,self.name)
        self.menuOptions = [["AutomationScenesView","ESCENAS"],["AutomationLightsView","LUCES"],["AutomationRollersView","PERSIANAS"],["AutomationPlugsView","ENCHUFES"],["AutomationRoomsView","ESTANCIAS"]]
        self.icon = "house.png"
        self.color = Config.GREEN_COLOR
        self.index = index

    def drawRect(self):
        pygame.draw.rect(self.window,self.color,self.menuRect,0)

    def drawView(self):
        self.emptyScreen()
        self.drawRect()
        self.drawBackButton(self.window)
        self.drawMenu()
        self.selectActiveInnerView(self.index)
        pygame.display.flip()

    def onPressMenuOption(self):
        pass