<?php

declare(strict_types=1);

return [
    'app_name' => 'Panorama Lab',
    'version' => trim((string) @file_get_contents(__DIR__ . '/VERSION')) ?: '1.5.0',
    'update_url' => getenv('LAB_UPDATE_URL') ?: 'https://magicphotobooth.gr/lab/update/latest.json',
    'app_url' => getenv('LAB_APP_URL') ?: 'https://magicphotobooth.gr/lab',
    'license' => [
        'server' => getenv('LAB_LICENSE_URL') ?: 'https://magicphotobooth.gr/lab',
        'secret' => getenv('LAB_LICENSE_SECRET') ?: 'plab-lic-7f3a9c2e1b84d06e5a91c4f8b2d7e0a6',
        'grace_days' => 14,
        'file' => getenv('LAB_LICENSE_FILE') ?: '',
    ],
    'base_path' => getenv('LAB_BASE_PATH') !== false ? getenv('LAB_BASE_PATH') : 'auto',
    'db_path' => __DIR__ . '/data/lab.sqlite',
    'session_name' => 'panorama_lab',
    'uploads_dir' => __DIR__ . '/data/uploads',
    'orders_dir' => __DIR__ . '/data/orders',
    'hotfolder_dir' => __DIR__ . '/data/hotfolder',
    'print_dir' => __DIR__ . '/data/print-ready',

    'output' => [
        'dnp_printer' => getenv('LAB_DNP_PRINTER') ?: '',
        'dnp_hotfolder' => getenv('LAB_DNP_HOTFOLDER') ?: '',
        'save_dir' => getenv('LAB_SAVE_DIR') ?: '',
    ],

    'business' => [
        'name' => 'Πανόραμα',
        'email' => 'info@magicphotobooth.gr',
        'phone' => '2421200132',
        'phone_alt' => '2421200131',
    ],

    'admin' => [
        'username' => getenv('LAB_ADMIN_USER') ?: 'admin',
        'password' => getenv('LAB_ADMIN_PASS') ?: 'panorama',
        'name' => 'Εργαστήριο',
        'pin' => getenv('LAB_STAFF_PIN') ?: '1989',
    ],

    'stores' => [
        'metamorphoseos' => [
            'id' => 'metamorphoseos',
            'name' => 'Μεταμορφώσεως 20',
            'phone' => '2421200131',
        ],
        'kartali' => [
            'id' => 'kartali',
            'name' => 'Καρτάλη',
            'phone' => '2421029717',
        ],
    ],

    'products' => [
        ['sku' => '10x15', 'name' => '10×15 εκ.', 'width_cm' => 10, 'height_cm' => 15, 'price_cents' => 40, 'sort' => 1],
        ['sku' => '13x18', 'name' => '13×18 εκ.', 'width_cm' => 13, 'height_cm' => 18, 'price_cents' => 100, 'sort' => 2],
        ['sku' => '15x21', 'name' => '15×21 εκ.', 'width_cm' => 15, 'height_cm' => 21, 'price_cents' => 140, 'sort' => 3],
        ['sku' => '20x25', 'name' => '20×25 εκ.', 'width_cm' => 20, 'height_cm' => 25, 'price_cents' => 420, 'sort' => 4],
        ['sku' => '20x30', 'name' => '20×30 εκ.', 'width_cm' => 20, 'height_cm' => 30, 'price_cents' => 430, 'sort' => 5],
        ['sku' => '30x40', 'name' => '30×40 εκ.', 'width_cm' => 30, 'height_cm' => 40, 'price_cents' => 1300, 'sort' => 6],
        ['sku' => 'id35x45', 'name' => 'Ταυτότητα 3,5×4,5 εκ.', 'width_cm' => 3.5, 'height_cm' => 4.5, 'price_cents' => 120, 'sort' => 20],
        ['sku' => 'passport', 'name' => 'Διαβατήριο 3,5×4,5 εκ.', 'width_cm' => 3.5, 'height_cm' => 4.5, 'price_cents' => 120, 'sort' => 21],
        ['sku' => 'id9x13', 'name' => 'Ταυτότητες 4 σε 9×13 εκ.', 'width_cm' => 9, 'height_cm' => 13, 'price_cents' => 120, 'sort' => 7],
        ['sku' => 'notebook', 'name' => 'Τετράδιο A4 (εξώφυλλο)', 'width_cm' => 21, 'height_cm' => 30, 'price_cents' => 250, 'sort' => 9],
        ['sku' => 'cal2027-1', 'name' => 'Ημερολόγιο 2027 · 1 σελίδα A4', 'width_cm' => 21, 'height_cm' => 30, 'price_cents' => 500, 'sort' => 11],
        ['sku' => 'cal2027-12', 'name' => 'Ημερολόγιο 2027 · 12 σελίδες A4', 'width_cm' => 21, 'height_cm' => 30, 'price_cents' => 1800, 'sort' => 12],
    ],

    'shipping' => [
        'acs_cents' => 490,
        'rush_cents' => 200,
    ],

    'limits' => [
        'max_photos' => 500,
        'max_file_mb' => 40,
        'thumb_edge' => 240,
        'preview_edge' => 1400,
        'export_long_edge' => 0,
    ],

    'mail' => [
        'from_email' => 'info@magicphotobooth.gr',
        'from_name' => 'Panorama Lab',
        'to' => 'info@magicphotobooth.gr',
        'reply_to' => 'info@magicphotobooth.gr',
        'driver' => getenv('LAB_MAIL_DRIVER') ?: 'log',
        'smtp' => [
            'host' => getenv('LAB_SMTP_HOST') ?: 'magicphotobooth.gr',
            'port' => (int) (getenv('LAB_SMTP_PORT') ?: 465),
            'encryption' => getenv('LAB_SMTP_ENC') ?: 'ssl',
            'username' => getenv('LAB_SMTP_USER') ?: 'info@magicphotobooth.gr',
            'password' => getenv('LAB_SMTP_PASS') ?: '',
        ],
    ],
];
