"""File containing infoscreen urls."""

from django.urls import re_path
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 = [
    re_path(r"^$", default),
    re_path(r"^admin$", admin),
    re_path(r"^(?P<idx>\d+)$", index),
    re_path(r"^items$", info_items),
    re_path(r"^rotation/(?P<idx>\d+)$", rotation),
    re_path(r"^rotations$", rotations),
    re_path(r"^instance$", createInstance),
    re_path(r"^instance/(?P<idx>\d+)$", deleteInstance),
    re_path(r"^types$", info_types),
    re_path(r"^delete_item/(?P<type_id>\d+)/(?P<idx>\d+)$", delete_info_item),
    re_path(r"^create_external_image$", createExternalImageInfoItem),
    re_path(r"^create_image$", create_image_item),
    re_path(r"^create_video$", create_video_item),
    re_path(r"^create_abbitem$", createABBItem),
    re_path(r"^create_sossoitem$", createSossoItem),
    re_path(r"^create_lunchitem$", createLunchItem),
    re_path(r"^create_eventitem$", createEventItem),
    re_path(r"^create_apyitem$", createApyItem),
    re_path(r"^create_websiteitem$", createExternalWebsiteItem),
    re_path(r"^create_rotation$", create_rotation),
    re_path(r"^delete_rotation/(?P<id>\d+)$", delete_rotation),
    re_path(r"^apyjson", get_apy_json),
]

if settings.DEBUG:
    from django.contrib.staticfiles.urls import staticfiles_urlpatterns

    urlpatterns += staticfiles_urlpatterns()
