"""Permissions plugin — file/folder permissions, share links, public access."""

from __future__ import annotations

from app.plugins.base import BasePlugin
from app.plugins.manifest import PluginManifest, PluginRouteDef


class PermissionsPlugin(BasePlugin):
    """Permissions plugin for managing file/folder access and public share links."""

    manifest = PluginManifest(
        name="permissions",
        version="1.0.0",
        display_name="Permissions",
        description="File/folder permissions, share links with password+expiry, public access.",
        dependencies=[],
        routes=[
            PluginRouteDef(
                path="/api/v1/dms",
                module="app.plugins.builtins.permissions.routes",
                router_attr="router",
            ),
            PluginRouteDef(
                path="/api/public",
                module="app.plugins.builtins.permissions.routes",
                router_attr="public_router",
            ),
        ],
        events=[],
        migrations=["0001_initial.sql"],
        permissions=[],
        is_core=True,
    )
