The availability value.
The translated label, or the raw value if unrecognized.
availabilityLabel("in_stock"); // => "In Stock" (en) / "Dostępny" (pl)
export function availabilityLabel(value: string): string {
return isAvailability(value) ? i18n(`availability_${value}`) : value;
}
Localized label for an availability value (see isAvailability). Also covers the drawer's grouped filter codes (
in_stock,out_of_stock, …), which are a subset of the enum values. Falls back to the raw value for anything outside the known set.