(function (root, factory) {
  const mockEstimate = factory();
  if (typeof module === "object" && module.exports) {
    module.exports = mockEstimate;
  } else {
    root.MealSnapshotMockEstimate = mockEstimate;
  }
}(typeof globalThis !== "undefined" ? globalThis : this, function () {
  "use strict";

  const DISCLAIMER = "This is an estimate based on your photo. It may miss sauces, oils, ingredients, or portion sizes. Review and adjust before saving.";

  const SEED = Object.freeze({
    title: "Turkey egg croissant",
    confidenceLabel: "Local mock estimate - review required",
    calories: 540,
    protein: 30,
    carbs: 39,
    fat: 29,
    ingredients: Object.freeze([
      Object.freeze({ id: "mock-croissant", name: "Croissant", amount: "1 sandwich" }),
      Object.freeze({ id: "mock-egg", name: "Egg", amount: "1 folded egg" }),
      Object.freeze({ id: "mock-turkey", name: "Turkey", amount: "about 3 oz" }),
      Object.freeze({ id: "mock-cheese", name: "Cheddar cheese", amount: "1 slice" })
    ]),
    leanerNote: "Use this local example as a starting point. Review every ingredient and portion before relying on the estimate.",
    disclaimer: DISCLAIMER,
    source: "local_mock",
    requiresReview: true
  });

  function createMockMealSnapshotEstimate() {
    return {
      title: SEED.title,
      confidenceLabel: SEED.confidenceLabel,
      calories: SEED.calories,
      protein: SEED.protein,
      carbs: SEED.carbs,
      fat: SEED.fat,
      ingredients: SEED.ingredients.map((ingredient) => ({ ...ingredient })),
      leanerNote: SEED.leanerNote,
      disclaimer: SEED.disclaimer,
      source: SEED.source,
      requiresReview: true
    };
  }

  return Object.freeze({
    DISCLAIMER,
    createMockMealSnapshotEstimate
  });
}));
