"""
URL Configuration for the automations app.

Routes:
- /automations/ - List available automations from registry
- /automation-templates/ - CRUD for automation templates
- /automation-installations/ - Manage installed automations
- /event-automations/ - Attach automations to events
- /global-event-automations/ - Global automation rules
"""

from rest_framework.routers import DefaultRouter

from .views import (
    AutomationViewSet,
    AutomationTemplateViewSet,
    AutomationInstallationViewSet,
    EventAutomationViewSet,
    GlobalEventAutomationViewSet,
)

router = DefaultRouter()

# Registry-based automations (built-in + custom)
router.register(r'automations', AutomationViewSet, basename='automation')

# Automation templates (marketplace)
router.register(r'automation-templates', AutomationTemplateViewSet, basename='automationtemplate')

# Installed automations
router.register(r'automation-installations', AutomationInstallationViewSet, basename='automationinstallation')

# Event-attached automations
router.register(r'event-automations', EventAutomationViewSet, basename='eventautomation')

# Global event automation rules
router.register(r'global-event-automations', GlobalEventAutomationViewSet, basename='globaleventautomation')

urlpatterns = router.urls
