<?php

return [
    'app' => [
        'env' => 'production',
        'timezone' => '{{timezone}}',
    ],

    'settings' => [
        'logger' => [
            'path' => '{{logs_path}}',
        ],
    ],

    'database' => [
        'type' => '{{db_type}}',
        'host' => '{{db_host}}',
        'port' => {{db_port}},
        'name' => '{{db_name}}',
        'username' => '{{db_user}}',
        'password' => '{{db_password}}',
        'engine' => 'InnoDB',
        'charset' => 'utf8mb4',
        // When using unix socket to connect to the database the host attribute should be removed
        // 'socket' => '/var/lib/mysql/mysql.sock',
        'socket' => '{{db_socket}}',
    ],

    'cache' => [
        'enabled' => {{cache.enabled}},
        'response_ttl' => {{cache.response_ttl}}, // seconds
        'pool' => [
            {{optional(cache.adapter)}},
            {{optional(cache.path)}},
            {{optional(cache.host)}},
            {{optional(cache.port)}},
        ],
        // 'pool' => [
        //    'adapter' => 'apc'
        // ],
        // 'pool' => [
        //    'adapter' => 'apcu'
        // ],
        // 'pool' => [
        //    'adapter' => 'filesystem',
        //    'path' => 'cache', // relative to the api directory
        // ],
        // 'pool' => [
        //    'adapter'   => 'memcached',
        //    //'url' => 'localhost:11211;localhost:11212'
        //    'host'      => 'localhost',
        //    'port'      => 11211
        // ],
        // 'pool' => [
        //    'adapter'   => 'memcache',
        //    'url' => 'localhost:11211;localhost:11212'
        //    //'host'      => 'localhost',
        //    //'port'      => 11211
        // ],
        // 'pool' => [
        //    'adapter'   => 'redis',
        //    'host'      => 'localhost',
        //    'port'      => 6379
        // ],
    ],

    'storage' => [
        'adapter' => '{{storage.adapter}}',
        // The storage root is the directus root directory.
        // All path are relative to the storage root when the path is not starting with a forward slash.
        // By default the uploads directory is located at the directus public root
        // An absolute path can be used as alternative.
        'root' => '{{storage.root}}',
        // This is the url where all the media will be pointing to
        // here is where Directus will assume all assets will be accessed
        // Ex: (yourdomain)/uploads/_/originals
        'root_url' => '{{storage.root_url}}',
        // Same as "root", but for the thumbnails
        'thumb_root' => '{{storage.thumb_root}}',
        {{optional(storage.key)}},
        {{optional(storage.secret)}},
        {{optional(storage.region)}},
        {{optional(storage.version)}},
        {{optional(storage.bucket)}},
        {{optional(storage.options)}},
        // Set custom S3 endpoint
        {{optional(storage.endpoint)}},
        // Use an internal proxy for downloading all files
        {{optional(storage.proxy_downloads)}},
    ],

    'mail' => [
        'default' => [
            'transport' => '{{mail.transport}}',
            {{optional(mail.sendmail)}},
            {{optional(mail.host)}},
            {{optional(mail.port)}},
            {{optional(mail.username)}},
            {{optional(mail.password)}},
            {{optional(mail.encryption)}},
            'from' => '{{mail_from}}'
        ],
    ],

    'cors' => [
        'enabled' => {{cors.enabled}},
        'origin' => {{cors.origin}},
        'methods' => {{cors.methods}},
        'headers' => {{cors.headers}},
        'exposed_headers' => {{cors.exposed_headers}},
        'max_age' => {{cors.max_age}}, // in seconds
        'credentials' => {{cors.credentials}},
    ],

    'rate_limit' => [
        'enabled' => {{rate_limit.enabled}},
        'limit' => {{rate_limit.limit}}, // number of request
        'interval' => {{rate_limit.interval}}, // seconds
        {{optional(rate_limit.adapter)}},
        {{optional(rate_limit.host)}},
        {{optional(rate_limit.port)}},
        {{optional(rate_limit.timeout)}},
    ],

    'hooks' => [
        'actions' => [],
        'filters' => [],
    ],

    'feedback' => [
        'token' => '{{feedback_token}}',
        'login' => {{feedback_login}}
    ],

    // These tables will not be loaded in the directus schema
    'tableBlacklist' => [],

    'auth' => [
        'secret_key' => '{{auth.secret}}',
        'public_key' => '{{auth.public}}',
        {{optional(auth.social_providers)}},
        // 'okta' => [
        //     'client_id' => '',
        //     'client_secret' => '',
        //     'base_url' => 'https://dev-000000.oktapreview.com/oauth2/default'
        // ],
        // 'github' => [
        //     'client_id' => '',
        //     'client_secret' => ''
        // ],
        // 'facebook' => [
        //     'client_id'          => '',
        //     'client_secret'      => '',
        //     'graph_api_version'  => 'v2.8',
        // ],
        // 'google' => [
        //     'client_id'       => '',
        //     'client_secret'   => '',
        //     'hosted_domain'   => '*',
        //     // Uses OpenIDConnect to fetch the email instead of using the Google+ API
        //     // Disabling the OIDC Mode, requires you to enable the Google+ API otherwise it will fail
        //     'use_oidc_mode'   => true,
        // ],
        // 'twitter' => [
        //     'identifier'   => '',
        //     'secret'       => ''
        // ]
    ],
];
