# Path: app/state.py
# class State:
# class ProgramNotFound(Exception):
#     def __init__(self, is_hd=True):
#     def set_model(self, is_hd):
#     def start_program(self, name, params={}):
#     def stop_program(self):
#     def _get_program(self, name):
#     def _set_brightness(self, params):
#     def _set_rotation(self, params):
#     def _start_process(self, program, params):
#         def run_program(self):


from flask import render_template, request, Blueprint
from collections import namedtuple
from app.state import state
import app.programs.hd
import app.programs.original



ListItem = namedtuple("Button", "key title")

hd_programs_list = []
for key, program in sorted(app.programs.hd.list.items()):
    hd_programs_list.append(ListItem(key, program.title))

original_programs_list = []
for key, program in sorted(app.programs.original.list.items()):
    original_programs_list.append(ListItem(key, program.title))


index = Blueprint('index', __name__, template_folder='templates')
@index.route('/', methods=['GET'])
def show():

    if request.method == 'GET':
        if state.is_hd is True:
            programs_list = hd_programs_list
        else:

# Path: app/state.py
# class State:
# class ProgramNotFound(Exception):
#     def __init__(self, is_hd=True):
#     def set_model(self, is_hd):
#     def start_program(self, name, params={}):
#     def stop_program(self):
#     def _get_program(self, name):
#     def _set_brightness(self, params):
#     def _set_rotation(self, params):
#     def _start_process(self, program, params):
#         def run_program(self):


# Path: app/views.py
from flask import render_template, request, Blueprint
from collections import namedtuple
from app.state import state
import app.programs.hd
import app.programs.original




ListItem = namedtuple("Button", "key title")

hd_programs_list = []
for key, program in sorted(app.programs.hd.list.items()):
    hd_programs_list.append(ListItem(key, program.title))

original_programs_list = []
for key, program in sorted(app.programs.original.list.items()):
    original_programs_list.append(ListItem(key, program.title))


index = Blueprint('index', __name__, template_folder='templates')
@index.route('/', methods=['GET'])
def show():

    if request.method == 'GET':
        if state.is_hd is True:
            programs_list = hd_programs_list
        else:

            programs_list = original_programs_list