"""
Instantly.ai API Configuration
Created: March 11, 2026
"""

import os
import base64
from pathlib import Path

# API Key (stored securely)
INSTANTLY_API_KEY_ENCODED = "YzgyNjBhMDgtNTRiMi00NGE0LTg3MDctOTg0M2Y4NWZjZWU0OmF4TkZGVnZHb1J0eg=="
INSTANTLY_API_KEY = "c8260a08-54b2-44a4-8707-9843f85fcee4:axNFFVvGoRtz"

# API Base URL
INSTANTLY_API_BASE = "https://api.instantly.ai/api/v1"

# Campaign Settings
DEFAULT_SEND_SCHEDULE = {
    "timezone": "Pacific/Auckland",
    "send_window_start": "08:00",
    "send_window_end": "17:00",
    "days": ["monday", "tuesday", "wednesday", "thursday", "friday"]
}

# Daily send limits per account
DAILY_SEND_LIMIT = 30
TOTAL_ACCOUNTS = 5
MAX_DAILY_SENDS = DAILY_SEND_LIMIT * TOTAL_ACCOUNTS  # 150

# Sequence timing (days from initial email)
SEQUENCE_TIMING = {
    "email_1": 0,   # Initial outreach
    "email_2": 3,   # Value add
    "email_3": 7,   # Social proof
    "email_4": 14,  # Last chance
    "email_5": 21   # Break-up
}

# Campaign naming convention
# Format: PHT - [Region] - [Fruit Type] - [Month Year]
# Example: PHT - USA - Apples - March 2026

def get_campaign_name(region, fruit_type, month_year):
    """Generate standardized campaign name"""
    return f"PHT - {region} - {fruit_type} - {month_year}"

# Email accounts (warmed to 100)
WARMED_ACCOUNTS = [
    "account1@domain.com",  # To be filled from Instantly
    "account2@domain.com",
    "account3@domain.com",
    "account4@domain.com",
    "account5@domain.com"
]
