<?php

$default_port = '8085';
$getReaderEndpoint = fn($x) => 'http://localhost:' . $x . '/?MYKADJSON';

return[
    'endpoint' => env('MYKAD_READER_ENDPOINT', $getReaderEndpoint(env('MYKAD_READER_PORT', $default_port))),
    'enabled_cawangan' => array_map(fn ($cawangan) => trim($cawangan), explode(',', env('MYKAD_READER_ENABLED_CAWANGAN'))) ?? [],
];
