<?php

return [
    // Code of the company created by OrganizationSeeder.
    'default_company_code' => env('MAMS_DEFAULT_COMPANY_CODE', 'AT'),

    // Human-readable applicant reference: MAMS-DHK-2026-000001 (§9.3).
    'applicant_reference' => [
        // Applicant references read AT-DHK-2026-000001.
        'prefix' => env('MAMS_APPLICANT_PREFIX', 'AT'),
        'padding' => 6,
    ],

    'documents' => [
        // Private disk; documents are never served from public storage (§17.3).
        'disk' => env('MAMS_DOCUMENT_DISK', 'local'),
        'root' => 'documents',
        // Signed preview/download links expire quickly (§17B.15).
        'link_ttl_minutes' => (int) env('MAMS_DOCUMENT_LINK_TTL', 10),
        'default_mime_types' => [
            'application/pdf',
            'image/jpeg',
            'image/png',
            'image/webp',
            'image/heic',
        ],
        // Extensions that must never be accepted, whatever the declared type.
        'blocked_extensions' => [
            'php', 'phtml', 'phar', 'exe', 'sh', 'bat', 'cmd', 'com', 'js',
            'jar', 'msi', 'dll', 'so', 'htaccess', 'svg',
        ],
        'max_file_size_kb' => (int) env('MAMS_DOCUMENT_MAX_KB', 10240),
    ],

    'requisitions' => [
        // Document types a public, unauthenticated employer may attach (§144).
        // Anything outside this list is not theirs to upload.
        'allowed_document_codes' => [
            'demand_letter',
            'power_of_attorney',
            'employer_trade_license',
            'labor_approval',
            'job_description',
        ],
        'max_documents' => 10,
        // Public uploads are held to a tighter size limit than staff uploads.
        'max_file_size_kb' => (int) env('MAMS_REQUISITION_MAX_KB', 5120),
    ],

    'refunds' => [
        // Above this payable amount (minor units) a refund needs a second,
        // higher approval than the reviewing officer's (§31).
        'approval_limit' => (int) env('MAMS_REFUND_APPROVAL_LIMIT', 5000000),
        // Reason codes offered on the request form.
        'reason_codes' => [
            'visa_rejected' => 'Visa rejected',
            'medical_unfit' => 'Medically unfit',
            'demand_cancelled' => 'Job demand cancelled',
            'applicant_withdrew' => 'Applicant withdrew',
            'overpayment' => 'Overpayment',
            'duplicate_payment' => 'Duplicate payment',
            'service_not_delivered' => 'Service not delivered',
            'other' => 'Other',
        ],
    ],

    'messaging' => [
        // Until an agency plugs a gateway in, SMS and WhatsApp messages are
        // recorded and logged rather than reported as delivered (§56).
        'sms' => ['enabled' => env('MAMS_SMS_ENABLED', false)],
        'whatsapp' => ['enabled' => env('MAMS_WHATSAPP_ENABLED', false)],
    ],

    'money' => [
        // Money is stored as integer minor units; never floats (§112).
        'base_currency' => env('MAMS_BASE_CURRENCY', 'BDT'),
        'minor_units' => 2,
    ],
];
