<?php

return [
    'name' => 'MedDocuments',

    /*
    | Module version — written into the core `system` table as the
    | `meddocuments_version` property by the InstallController (LOWERCASE key,
    | matching ModuleUtil::isModuleInstalled which reads strtolower(name).'_version').
    */
    'module_version' => '1.0.0',

    /*
    |--------------------------------------------------------------------------
    | Storage path prefix
    |--------------------------------------------------------------------------
    | Files are stored under this prefix on the resolved disk, off the public
    | web root. Every file is served through the controller routes only — never
    | by a direct public URL — so watermarking + audit logging always apply.
    | Layout: meddocs/{business_id}/{document_id}/v{n}_{sanitized_filename}
    */
    'path_prefix' => 'meddocs',

    /*
    |--------------------------------------------------------------------------
    | Disk resolution
    |--------------------------------------------------------------------------
    | When the SmartStorage module is installed (system.smartstorage_version is
    | set) we resolve SmartStorage's target disk — that disk is transparently
    | swapped to the smart adapter, so backends/encryption/ss_access_logs come
    | for free and we NEVER reimplement any of it. Otherwise we fall back to a
    | private `meddoc` disk (registered additively in the service provider,
    | rooted OFF the public web root) so files are only reachable through the
    | audited/watermarked controller routes. See Services\MedDocuments::resolveDisk().
    */
    'fallback_disk' => env('MEDDOC_DISK', 'meddoc'),

    /*
    |--------------------------------------------------------------------------
    | Private disk root (off the public dir on purpose)
    |--------------------------------------------------------------------------
    | The `meddoc` disk (registered at runtime by MedDocumentsServiceProvider,
    | never editing core filesystems.php) is rooted here so the legacy
    | /uploads/... guessable paths cannot reach medical documents — everything
    | is served through the controller routes with audit + watermark.
    | Rooted at storage/app (not storage/app/meddocs): stored paths already
    | carry the meddocs/{business}/{doc} prefix, which namespaces the folder
    | without doubling the segment.
    */
    'private_root' => storage_path('app'),
];
