<?php

use Tricks\CampaignMonitor\Helpers\Exceptional;

return [
    'transactional' => [
        /**
         * The API key of a Campaign Monitor (CM) account (https://help.createsend.com/admin/api-keys#instructions).
         * Should always point to tricks CM account, see 1Password.
         */
        'api_key' => env('CAMPAIGNMONITOR_TRANSACTIONAL_API_KEY'),

        /**
         * The client ID of a Campaign Monitor account (https://help.createsend.com/admin/api-keys#instructions).
         * Should also point to tricks CM account, see 1Password.
         */
        'client_id' => env('CAMPAIGNMONITOR_TRANSACTIONAL_CLIENT_ID'),

        'mails' => [
            /**
             * Here you can define the different transactional mails, that you added to the CM account.
             */
            'dummy' => [
                'id' => '636b7b95-2bd7-4d23-b206-3dbe701d7253',
                'recipient' => 'foo@dev.tricks.de',
                /**
                 * These rules correspondent to the email variables that the mail uses.
                 * You can find the used variables via the `php artisan cm:list` command, JSON key "EmailVariables".
                 */
                'rules' => [
                    'test1' => 'required',
                    'test2' => 'required'
                ]
            ],
            'dummy_with_multiple_recipients' => [
                'id' => '636b7b95-2bd7-4d23-b206-3dbe701d7253',
                'recipient' => 'foo@dev.tricks.de; bar@dev.tricks.de',
                /**
                 * These rules correspondent to the email variables that the mail uses.
                 * You can find the used variables via the `php artisan cm:list` command, JSON key "EmailVariables".
                 */
                'rules' => [
                    'test1' => 'required',
                    'test2' => 'required'
                ]
            ],
            'dummy_with_attachment' => [
                'id' => '636b7b95-2bd7-4d23-b206-3dbe701d7253',
                'recipient' => 'foo@dev.tricks.de',
                /**
                 * These rules correspondent to the email variables that the mail uses.
                 * You can find the used variables via the `php artisan cm:list` command, JSON key "EmailVariables".
                 */
                'rules' => [
                    'test1' => 'required',
                    'test2' => 'required',
                    'attachments' => 'required'
                ]
            ],
            'dummy_with_dynamic_recipient' => [
                'id' => '636b7b95-2bd7-4d23-b206-3dbe701d7253', /**
                 * These rules correspondent to the email variables that the mail uses.
                 * You can find the used variables via the `php artisan cm:list` command, JSON key "EmailVariables".
                 */
                'rules' => [
                    'recipient' => 'required',
                ]
            ],
        ]
    ],
];
