<?php

return [

    /*
    |--------------------------------------------------------------------------
    | Third Party Services
    |--------------------------------------------------------------------------
    |
    | This file is for storing the credentials for third party services such
    | as Mailgun, Postmark, AWS and more. This file provides the de facto
    | location for this type of information, allowing packages to have
    | a conventional file to locate the various service credentials.
    |
    */

    'mailgun' => [
        'domain' => env('MAILGUN_DOMAIN'),
        'secret' => env('MAILGUN_SECRET'),
        'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
    ],

    'postmark' => [
        'token' => env('POSTMARK_TOKEN'),
    ],

    'ses' => [
        'key' => env('AWS_ACCESS_KEY_ID'),
        'secret' => env('AWS_SECRET_ACCESS_KEY'),
        'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
    ],

    'auto-trader' => [
        'merchant_id' => env('AUTO_TRADER_MERCHANT_ID'),
        'use_live_api' => env('AUTO_TRADER_USE_LIVE_API'),
        'api_key' => env('AUTO_TRADER_API_KEY'),
        'api_secret' => env('AUTO_TRADER_API_SECRET'),
    ],

    'auto-trader-ai' => [
        'use_live_api' => env('AUTO_TRADER_USE_LIVE_API'),
        'api_key' => env('AUTO_TRADER_AI_API_KEY'),
        'api_secret' => env('AUTO_TRADER_AI_API_SECRET'),
    ],

    'auto-trader-hub' => [
        'url' => env('AUTO_TRADER_HUB_URL', 'https://autotrader.mtcassets.com'),
        'api_key' => env('AUTO_TRADER_HUB_API_KEY'),
    ],

    'sync' => [
        'prod_url' => 'https://my.getautonomy.co.uk',
        'vps_url' => 'https://my.autonomystage.mtcserver.com',
    ],

    'silver-bullet' => [
        'media_size' => '1000x1000',
        'store-export-logs' => true,
    ],
    'imagin-studio' => [
        'key' => 'mtc-autonomy',
    ],

    'enquiry-max' => [
        'mode' => env('ENQUIRY_MAX_API_MODE', 'live'),
    ],
    'ev_data' => [
        'user_id' => env('EV_DATA_USER_ID'),
        'key' => env('EV_DATA_USER_KEY'),
    ],

    'skupenet' => [
        'api_key' => env('SKUPENET_API_KEY'),
    ],

    'dealer-web' => [
        'endpoint' => env('DEALERWEB_LMS_ENDPOINT', 'https://services.dealerweb.app/LMS/lms.asmx'),
    ],

    'sales-channels' => [
        'car-guru' => \App\Modules\SalesChannels\CarGuru::class,
        'motors-co-uk' => \App\Modules\SalesChannels\MotorsCoUk::class,
    ],

    'currency' => [
        'endpoint' => 'http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml'
    ],

    'matomo' => [
        'auth_token' => env('MATOMO_AUTH_TOKEN'),
        'domain' => env('MATOMO_DOMAIN', 'matomo'),
    ],

    'image-sync' => [
        'autos-on-show' => [
            'live_api' => env('AUTOS_ON_SHOW_LIVE', true),
            'notification_token' => env('AUTOS_ON_SHOW_NOTIFICATION_TOKEN'),
        ],
        'auto-imaging' => [
            'key' => env('AUTO_IMAGING_AUTH_KEY'),
        ],
    ],
    'auto-trader-microservice' => [
        'api_key' => env('MTC_AUTO_TRADER_SERVICE_API_KEY'),
    ],
    'keyloop-rev8' => [
        'disk' => env('KEYLOOP_REV8_DISK', 'local'),
    ],
    'skoda' => [
       'endpoint' => 'https://www.skoda.ie/apps/stock/941/en-IE/api/'
    ],
    'open-ai' => [
        'model' => env('OPENAI_MODEL', 'gpt-4o'),
        'endpoint' => 'https://api.openai.com/v1/'
    ],
    'occupop' => [
        'endpoint' => 'https://api.occupop.com/api/webhooks/jobs/'
    ],
    'autoweb' => [
        'endpoint' => 'https://api.autoweb.co.uk'
    ],
    'codeweavers' => [
        'username' => env('CODEWEAVERS_USERNAME'),
        'password' => env('CODEWEAVERS_PASSWORD'),
    ],
    'cloudflare' => [
        'email' => env('CLOUDFLARE_API_EMAIL'),
        'api_key' => env('CLOUDFLARE_API_KEY'),
    ],

    'pyxel' => [
        'IE' => [
            'client_id' => env('PYXEL_CLIENT_ID_IRELAND'),
        ],
        'GB' => [
            'client_id' => env('PYXEL_CLIENT_ID_UK'),
        ],
    ],

    'santander' => [
        'username' => env('SANTANDER_USERNAME'),
        'password' => env('SANTANDER_PASSWORD'),
        'environment' => env('SANTANDER_ENVIRONMENT', 'uat'),
    ],

    'autograb' => [
        'api_key' => env('AUTOGRAB_API_KEY'),
        'endpoint' => env('AUTOGRAB_API_ENDPOINT', 'https://api.autograb.co.uk'),
        // Inbound webhook throttle (requests/min/IP). Raise once the deferred batch
        // pipeline is proven so notifications are no longer dropped under load.
        'rate_limit' => env('AUTOGRAB_RATE_LIMIT', 100),

        // Daily Parquet stock feed delivered to a Google Cloud Storage bucket (SFSSA-114).
        // The service-account key is read from a path on disk; it must NOT be committed to
        // the repo. Store it outside the tree (or in a gitignored/mounted secret path) and
        // point AUTOGRAB_GCS_KEY_FILE at it.
        'feed' => [
            'gcs_key_file' => env('AUTOGRAB_GCS_KEY_FILE'),
            'gcs_project_id' => env('AUTOGRAB_GCS_PROJECT_ID'),
            'bucket' => env('AUTOGRAB_FEED_BUCKET', 'saxton-4x4'),
            // v2 adds price_includes_govt_charges + price_before_govt_charges, used to detect and
            // correct listings sent without VAT. See AutoGrabToVehicleImport::resolvePricing().
            'prefix' => env('AUTOGRAB_FEED_PREFIX', 'saxtons/lead_uk/v2'),
            // Path to the DuckDB CLI used to read Parquet parts (installed in the image).
            'duckdb_bin' => env('AUTOGRAB_DUCKDB_BIN', 'duckdb'),
        ],
    ],
];
