<?php

return [
    'app' => [
        'name' => 'Inbox API',
        'env' => 'production',
        'timezone' => 'America/Los_Angeles',
        'base_url' => '',
    ],
    'mailboxes' => [
        'secret_key' => 'CHANGE_THIS_TO_LONG_RANDOM_SECRET',
        'imap_open_options' => 0,
        'sync_limit' => 50,
        'attachments_directory' => 'uploads/mailboxes',
        'max_attachment_size_bytes' => 25 * 1024 * 1024,
        
        
        'delete_after_sync' => false, // if true, delete email from real mailbox after successful DB sync
        'move_to_folder_after_sync' => '', // if set like 'Processed', move email there after successful sync
        'mark_unread_on_insert' => false, // if true, force DB is_read = 0 on insert/update even if IMAP says read
        'store_attachments' => true, // if false, skip saving attachments locally
        'sync_inline_attachments' => true, // if true, save inline images/files too
        'mark_real_inbox_read_on_sync' => false, // if true, mark email as read in real mailbox after sync
        'mark_real_inbox_unread_on_sync' => false, // if true, mark email as unread in real mailbox after sync
    ],
    'db' => [
        'driver' => 'mysql',
        'host' => 'localhost',
        'port' => 3306,
        'name' => 'edafqifv_inbox',
        'username' => 'edafqifv_inbox',
        'password' => 'Usf230890@@',
        'charset' => 'utf8mb4',
    ],
    'guest_inbox' => [
        'cookie_name' => 'guest_inbox_token',
        'ttl_hours' => 2,
        'email_prefix' => '',
        'email_domain' => 'edafaty.com',
    ],
    'user_inbox' => [
        'email_domain' => 'edafaty.com',
        'username_min_length' => 3,
        'username_max_length' => 32,
    ],
    'auth' => [
        'session_cookie' => 'user_token',
        'session_ttl_days' => 30,
        'password_reset_ttl_minutes' => 30,
    ],
    'upload' => [
        'max_size_bytes' => 5 * 1024 * 1024,
        'allowed_extensions' => ['jpg', 'jpeg', 'png', 'webp', 'gif'],
        'allowed_mime_types' => ['image/jpeg', 'image/png', 'image/webp', 'image/gif'],
        'avatar_directory' => 'uploads/avatars',
    ],
];