• Map a DataModel subType field's choices (a { value: localizationKey } map, as produced by getChoicesMap / defineType) to an array of create-dialog options, localizing each label via localize.

    Pure and Foundry-free: the caller supplies the choices map (read at the boundary from CONFIG.Item.dataModels[type].schema) and a localizer. A missing/empty choices map yields an empty array — the signal that the type has no subtypes to ask for.

    Parameters

    • choices: undefined | StrictObject<string>

      The field's { value: localizationKey } choice map, or undefined when the type has no subType field.

    • localize: (key: string) => string = ...

      Localizer applied to each choice's label key.

    Returns SubTypeOption[]

    The subtype options, in the choice map's insertion order.