<?php

return [
    // Default file name pattern used when template does not override.
    // Available placeholders: {slug},{version},{generation.date},{generation.timestamp} and any token like {contract.reference}
    'file_name_pattern' => '{slug}_{generation.date}_{generation.timestamp}.docx',

    // Default date format (php date format) for generation.date
    'date_format' => 'Y-m-d',

    // Global policy: fail | blank | keep
    'unresolved_policy' => 'fail',

    // Preview generation
    'preview' => [
        'enabled' => true,
    ],

    // Whitelist of entities & attributes permitted for token usage
    'whitelist' => [
        'contract' => ['reference', 'start_date', 'end_date', 'description'],
        'client_case' => ['client_ref'],
        'client' => [
            'person',
            'person.full_name',
            'person.first_name',
            'person.last_name',
            'person.nu',
            'person.person_address',
            'person.person_address.address',
            'person.person_address.post_code',
            'person.person_address.city',
        ],
        'person' => [
            'full_name',
            'first_name',
            'last_name',
            'nu',
            'person_address',
            'person_address.address',
            'person_address.post_code',
            'person_address.city',
        ],
    ],
];
