import { z } from 'zod';
import { TouchBaseSchema } from '@isa/common/data-access';
import { RezeptmaszSchema } from './rezeptmasz.schema';
import { NutritionFactSchema } from './nutrition-fact.schema';

export const NutritionFactsSchema = TouchBaseSchema.extend({
  referenceQuantity: z.number().describe('Reference quantity').optional(),
  referenceQuantityUnitType: RezeptmaszSchema.describe('ReferenceQuantityUnit type').optional(),
  kiloJoule: z.number().describe('Kilo joule').optional(),
  kiloCalories: z.number().describe('Kilo calories').optional(),
  items: z.array(NutritionFactSchema).describe('List of items').optional(),
});

export type NutritionFacts = z.infer<typeof NutritionFactsSchema>;
