<?php
/**
 * config.php
 */

// ======== Configuration ========
$config = [
    'dirs' => ['logs', 'customers', 'chats', 'cache'],
    'verify_token'        => "smartlogic2024",
    'whatsapp_token'      => "EAAKOUbvLtOoBQSoUUrLaVW9wMJ4ZCYw2OztrM4AlntLuauWATbQD0qbk3B4ZCSU7oGUYPJmFwQq3ckZCiAtzBEhCMVYIN47NsdCXMRmleQGk77oyPAFSTnmNQZAXcRPFpb5urwWq6KMmZBtqZCWTSv6ZBOTE06QSmEtZAxE31qX1XmCucdCdaUwZBOPNA0AW0WeQMHQZDZD",
    'messenger_token'     => "EAAU3fZCXPBqkBPAcGFLOCC2t4vsi2pG7ZANV2Xanioql4gxgjvpMjwE9P7JT0l5JUsyQoox84NrdOBBtIS2YKv9wScQ9cFV7TWCMU4RW8VzOkZArm0ToaxmxNEgXSs4uhcRChU7orsn2iPiWO3mqE7pEMrQBxieWhrOEt9WjzOZAsZA1JlrM7hnbNJs52omt3QiwakwZDZD",
    'facebook_token'     => "EAAU3fZCXPBqkBPAcGFLOCC2t4vsi2pG7ZANV2Xanioql4gxgjvpMjwE9P7JT0l5JUsyQoox84NrdOBBtIS2YKv9wScQ9cFV7TWCMU4RW8VzOkZArm0ToaxmxNEgXSs4uhcRChU7orsn2iPiWO3mqE7pEMrQBxieWhrOEt9WjzOZAsZA1JlrM7hnbNJs52omt3QiwakwZDZD",

    'messenger_timeout' => 8, // أو أي قيمة مناسبة (بالثواني)
    'phone_number_id'     => "995453506976478",
    'max_history'         => 80,

    // Public URL where your screen images are hosted (must be HTTPS)
    // Example: 'https://YOUR-DOMAIN.COM/media/screens'
    'media_base_url'      => 'https://bot.smartlogiceg.com/serajmedia/media_screens/',
    // Local folder for attached screen images (used when prefer_local or URL missing)
    'media_local_dir'     => __DIR__ . '/media_screens',
    // Prefer local files over URL when available
    'media_prefer_local'  => true,
    // Public contact links (optional)
    'instagram_url'       => '',
    'website_url'         => '',
    // Business hours (optional, free text)
    'business_hours'      => '',
    // Contact details (optional)
    'contact_phone'       => '+968 9111 8616',
    'contact_email'       => 'info@serajmedia.om',
    'contact_address'     => 'P.O. Box 2160, P.C. 130, Muscat',
    // AI usage tuning
    'ai_model'            => 'gpt-4o-mini',
    'ai_max_tokens'       => 400,
    'ai_temperature'      => 0.3,
    'ai_max_history'      => 16,
    'ai_cache_ttl'        => 1800, // seconds
    'max_notes'           => 150,
    'api_timeout'         => 30,
    'whatsapp_timeout'    => 25,
    'whatsapp_text_limit' => 3500,
    'rate_limit_seconds'  => 3,
    'duplicate_threshold' => 8,
    'cache_ttl'           => 300, // 5 minutes cache
    // Media handling
    'ai_transcribe_model' => 'whisper-1',

    // Conversation start notifications (disabled by default)
    // 'send_welcome_on_new_chat' => true,
    // 'welcome_message' => 'أهلاً! بدأنا محادثة جديدة معك. كيف نساعدك اليوم؟',

    // Sales notifications
    'notify_on_new_chat'     => true,
    'sales_notify_numbers'   => ['96896651520'],
    'sales_manager_number'   => '96896651520',
    'sales_manager_emphasis' => true, // send extra emphasized copy to manager

    // If sending fails due to 24-hour session rules, use an approved template
    // Set to your approved template name in WhatsApp Cloud (e.g., 'new_chat_alert')
    'whatsapp_alert_template' => '',
    'template_language'       => 'ar',
];

// OpenAI Tokens with rotation
$openaiTokens = [
    "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",
];


$odoo = [
  'url'  => 'https://appnessgit-ideadesign1.odoo.com', // HTTPS
  'db'   => 'appnessgit-ideadesign1-main-12720670',
  'user' => 'drmohammed@serajmedia.com',
  'pass' => '9139f295ff937daed9273593267af94a48206f79',
  // اسم السورس الافتراضي (هيتعمل لو مش موجود):
  'default_source' => 'WhatsApp Chatbot'
];
