    <?php

// HubSpot Deal Button – local config.
// NOTE: Do NOT commit real tokens to public repos.
// Prefer setting these in your server environment when possible.
//
// This file is optional. The script hubspot-create-deal.php will:
// 1) try getenv('NAME'), and
// 2) if not set, fall back to constants defined here.

if (!defined('HUBSPOT_PRIVATE_APP_TOKEN')) {
    $t = getenv('HUBSPOT_PRIVATE_APP_TOKEN');
    define(
        'HUBSPOT_PRIVATE_APP_TOKEN',
        ($t !== false && $t !== '') ? $t : 'pat-na1-e082addd-b7fa-4906-b017-d20e881a5883'
    );
}

if (!defined('HUBSPOT_PIPELINE_ID')) {
    $p = getenv('HUBSPOT_PIPELINE_ID');
    define('HUBSPOT_PIPELINE_ID', ($p !== false && $p !== '') ? $p : 'default');
}

if (!defined('HUBSPOT_DEALSTAGE_ID')) {
    $s = getenv('HUBSPOT_DEALSTAGE_ID');
    // Default is a placeholder; set your "Sale completed" stage internal ID here or via env.
    define('HUBSPOT_DEALSTAGE_ID', ($s !== false && $s !== '') ? $s : '1329275420');
}

if (!defined('HUBSPOT_DEAL_PROPERTY_SHOPIFY_ORDER_ID')) {
    // Internal name of a Deal custom property (string). Create it in HubSpot first:
    // Settings → Data Management → Properties → Deal → Create property (e.g. "Shopify order id").
    define('HUBSPOT_DEAL_PROPERTY_SHOPIFY_ORDER_ID', 'shopify_order_id');
}

if (!defined('HUBSPOT_PORTAL_ID')) {
    // Optional: your HubSpot portal (Hub) ID, used only for building a \"View deal\" link.
    // Example: 12345678
    define('HUBSPOT_PORTAL_ID', '51059215');
}

// These should be the *internal* HubSpot stage IDs.
if (!defined('HUBSPOT_DEALSTAGE_SALE_COMPLETED_ID')) {
    $v = getenv('HUBSPOT_DEALSTAGE_SALE_COMPLETED_ID');
    define('HUBSPOT_DEALSTAGE_SALE_COMPLETED_ID', ($v !== false && $v !== '') ? $v : '1329275420');
}

if (!defined('HUBSPOT_DEALSTAGE_DRAWING_REQUESTED_ID')) {
    $v = getenv('HUBSPOT_DEALSTAGE_DRAWING_REQUESTED_ID');
    define('HUBSPOT_DEALSTAGE_DRAWING_REQUESTED_ID', ($v !== false && $v !== '') ? $v : '1154519639');
}

if (!defined('HUBSPOT_DEAL_PROPERTY_PRODUCT_NAMES')) {
    // Internal name of the Deal multi-line text property where you want to store
    // Shopify product names (e.g. "#1, Door;#2, Handle" on separate lines).
    // Default uses the same property name as hubspot-create-deal.php:
    // "product_configuration_summary".
    define('HUBSPOT_DEAL_PROPERTY_PRODUCT_NAMES', 'product_configuration_summary');
}
