namespace Baya.Infrastructure.Persistence.Configuration.CatalogConfig;

/// <summary>
/// The five MVP service categories, seeded via <c>HasData</c> so they land with the migration on a fresh
/// DB (the b1 seeding path) — a nurse can build a variant immediately. Ids are fixed and deterministic
/// (1…5, sort_order = id) so re-running is idempotent and the model snapshot stays stable. Option
/// groups/values are <b>not</b> seeded: those are admin-authored data per category (EAV is load-bearing).
/// </summary>
internal static class CatalogSeed
{
    // (id, name_fa, name_en). Companionship ships only as a seeded category (data), not a pricing path.
    private static readonly (long Id, string NameFa, string NameEn)[] CategoryRows =
    [
        (1, "مراقبت از سالمند", "Elderly Care"),
        (2, "مراقبت پس از جراحی", "Post-Surgery Recovery"),
        (3, "مراقبت از نوزاد", "Infant Care"),
        (4, "مدیریت بیماری مزمن", "Chronic Illness Management"),
        (5, "همراهی و مراقبت روزمره", "Companionship"),
    ];

    public static object[] Categories()
    {
        var ts = SeedConstants.Timestamp;
        return CategoryRows
            .Select(c => (object)new
            {
                c.Id,
                c.NameFa,
                c.NameEn,
                SortOrder = (int)c.Id,
                IsActive = true,
                CreatedAt = ts
            })
            .ToArray();
    }
}
