from simorgh.apps.modules.registry import CapabilitySpec, FeatureSpec, ModuleManifest, register_module

register_module(
    ModuleManifest(
        name="accounts",
        version=1,
        domain="platform",
        label_key="accounts.module_label",
        description="Accounts — user authentication, registration, and profile management",
        capabilities=(
            CapabilitySpec(slug="auth", label_key="accounts.capabilities.auth",
                          description="User authentication and account management", icon="lock"),
        ),
        features=(
            FeatureSpec(code="auth.registration", label_key="accounts.features.user_registration", 
                       scope="tenant", default_enabled=True, is_always_on=True, is_platform_internal=True, 
                       description="User registration and account creation"),
            FeatureSpec(code="auth.password_management", label_key="accounts.features.password_management", 
                       scope="tenant", default_enabled=True, is_always_on=True, is_platform_internal=True, 
                       description="Password reset, change, and strength policies"),
            FeatureSpec(code="auth.social_login", label_key="accounts.features.social_login", 
                       scope="tenant", default_enabled=False, 
                       description="OAuth and social media login integration"),
        ),
    )
)
