<?php

declare(strict_types=1);

namespace App\Services;

/**
 * Single source of truth for the import/export CSV column order, per
 * docs/03-api-spec.md's "Imports" section. Both the template download and
 * the export writer must use exactly this shape so a downloaded export can
 * be re-imported unmodified.
 */
class MemberCsvColumns
{
    /**
     * @return array<int, string>
     */
    public static function templateColumns(): array
    {
        return [
            'first_name',
            'last_name',
            'middle_name',
            'title',
            'gender',
            'date_of_birth',
            'marital_status',
            'phone_primary',
            'phone_secondary',
            'email',
            'address_line1',
            'address_line2',
            'city',
            'state_province',
            'postal_code',
            'country',
            'membership_status',
            'date_joined',
            'date_baptized',
            'occupation',
            'branch_code',
        ];
    }

    /**
     * @return array<int, string>
     */
    public static function exportColumns(): array
    {
        return ['member_number', ...self::templateColumns()];
    }
}
