"""File containing infoscreen urls."""

from django.conf.urls import url
from django.conf import settings

from infoscreen.views import index
from infoscreen.views import admin
from infoscreen.views import default
from infoscreen.views import rotation
from infoscreen.views import rotations
from infoscreen.views import info_items
from infoscreen.views import info_types
from infoscreen.views import delete_info_item
from infoscreen.views import createInstance
from infoscreen.views import deleteInstance
from infoscreen.views import createExternalImageInfoItem
from infoscreen.views import create_image_item
from infoscreen.views import create_video_item
from infoscreen.views import createABBItem
from infoscreen.views import createSossoItem
from infoscreen.views import createLunchItem
from infoscreen.views import createEventItem
from infoscreen.views import createExternalWebsiteItem
from infoscreen.views import create_rotation
from infoscreen.views import delete_rotation
from infoscreen.views import createApyItem
from infoscreen.views import get_apy_json

urlpatterns = [
    url(r'^$', default),
    url(r'^admin$', admin),
    url(r'^(?P<idx>\d+)$', index),
    url(r'^items$', info_items),
    url(r'^rotation/(?P<idx>\d+)$', rotation),
    url(r'^rotations$', rotations),
    url(r'^instance$', createInstance),
    url(r'^instance/(?P<idx>\d+)$', deleteInstance),
    url(r'^types$', info_types),
    url(r'^delete_item/(?P<type_id>\d+)/(?P<idx>\d+)$', delete_info_item),
    url(r'^create_external_image$', createExternalImageInfoItem),
    url(r'^create_image$', create_image_item),
    url(r'^create_video$', create_video_item),
    url(r'^create_abbitem$', createABBItem),
    url(r'^create_sossoitem$', createSossoItem),
    url(r'^create_lunchitem$', createLunchItem),
    url(r'^create_eventitem$', createEventItem),
    url(r'^create_apyitem$', createApyItem),
    url(r'^create_websiteitem$', createExternalWebsiteItem),
    url(r'^create_rotation$', create_rotation),
    url(r'^delete_rotation/(?P<id>\d+)$', delete_rotation),
    url(r'^apyjson', get_apy_json),
]

if settings.DEBUG:
    from django.contrib.staticfiles.urls import staticfiles_urlpatterns
    urlpatterns += staticfiles_urlpatterns()
