<?php

return [
    'prefix' => env('BUILDER_PREFIX', 'admin'),

    /*
     * Middleware applied to all builder routes.
     * 'web' is always included. Add 'auth' or a custom guard here.
     */
    'middleware' => ['web'],

    /*
     * The guard used to authenticate builder users.
     */
    'auth' => [
        'guard' => env('BUILDER_GUARD', 'web'),
        'require_mfa' => env('BUILDER_REQUIRE_MFA', false),
    ],

    /*
     * Built-in resources. Disable to prevent auto-registration.
     */
    'resources' => [
        'users' => env('BUILDER_USERS_RESOURCE', true),
        'roles' => env('BUILDER_ROLES_RESOURCE', true),
    ],

    /*
     * Base URL used for slug previews and canonical URL generation.
     * Defaults to APP_URL when left empty.
     */
    'public_url' => env('BUILDER_PUBLIC_URL', ''),

    /*
     * Supported UI locales. Keys are locale codes, values are display names.
     */
    'locales' => [
        'en' => 'English',
        'nl' => 'Nederlands',
    ],

    /*
     * Revision history settings.
     */
    'revisions' => [
        'keep' => env('BUILDER_REVISIONS_KEEP', 50),
    ],

    /*
     * Rate limiting.
     * Set to 0 to disable. Override via RateLimiter::for() in your AppServiceProvider.
     */
    'rate_limiting' => [
        'login' => env('BUILDER_RATE_LIMIT_LOGIN', 5),
        'global' => env('BUILDER_RATE_LIMIT_GLOBAL', 60),
    ],

    /*
     * Pagination defaults for resource index pages.
     * Override per-project by publishing the config.
     */
    'pagination' => [
        'per_page' => 25,
        'allowed' => [10, 25, 50, 100],
    ],

    /*
     * Global search settings.
     */
    'search' => [
        'max_results_per_resource' => 5,
    ],

];
