#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from .other import web as other_web
from .blocks import web as blocks_web
from .templates import web as templates_web
from flask import Blueprint
from flask_restx import Api

############################
# REST API
############################

from .dome import api as dome_api
from .telescope import api as telescope_api
from .camera import api as camera_api
from .environment import api as environment_api
from .logger import api as logger_api
from .templates import api as templates_api
from .blocks import api as blocks_api
from .other import api as other_api

api_blueprint = Blueprint('api', __name__)

api = Api(api_blueprint,
          title='OARPAF APIs for observatory control',
          version='1.0',
          description='A description',
          )

api.add_namespace(dome_api)
api.add_namespace(telescope_api)
api.add_namespace(camera_api)
api.add_namespace(environment_api)
api.add_namespace(logger_api)

api.add_namespace(blocks_api)
api.add_namespace(templates_api)
api.add_namespace(other_api)

############################
# WEB VIEW
############################


web_blueprint = Blueprint('web', __name__)

web = Api(web_blueprint,
          title='My Title',
          version='1.0',
          description='A description',
          )

web.add_namespace(blocks_web)
web.add_namespace(templates_web)
web.add_namespace(other_web)
